{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template mod_booking/subbooking/additionalitem

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-action
    * data-component
    * data-area
    * data-itemid

    Example context (json):
    {
        "items": [
            {
                "price": 30,
                "currency": "EUR",
                "name": "my item",
                "description": "more on my item",
                "button": "a code of button HTML"
            }
        ]
    }
}}
<ul class="list-group">
    {{#items}}
    <li>
        <div class="list-group-item list-group-item">
            <div class="d-flex w-100 justify-content-between">
            <h5 class="mb-1">{{name}}</h5>
            <small>{{price}} {{currency}}</small>
            </div>
            <div class="mb-1">
                <div class="d-flex w-100 justify-content-between">
                <span>
                    {{{description}}}
                </span>
                <span>
                    {{{button}}}
                </span>
                </div>
            </div>
        </div>
    </li>
    {{/items}}
</ul>
{{^items}}
    <p>{{#str}} noitems, mod_booking {{/str}}</p>
{{/items}}

{{#js}}
    require(['mod_booking/bookit'], function(init) {
    init.initbookitbutton();
    });
    require(['local_shopping_cart/cart'], function(cart) {
        cart.buttoninit();
    });
{{/js}}