{{!
    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 theme_boost_union/loginform-partial-method-start

    Partial template for the start of a login method container (applies to all layout types and all login methods).

    Context variables required for this template:
    * id - The method ID (e.g., "login-method-local"),
    * loginlayouttabs - Flag for tabs layout,
    * loginlayoutvertical - Flag for vertical layout,
    * loginlayoutaccordion - Flag for accordion layout,
    * active - Flag indicating if this method is currently active (for tabs and accordion),
    * isfirst - Flag indicating if this is the first method (for vertical layout divider),
    * label - Display label for the method,

    Example context (json):
    {
        "id": "login-method-local",
        "loginlayouttabs": true,
        "loginlayoutvertical": false,
        "loginlayoutaccordion": false,
        "active": true,
        "isfirst": true,
        "label": "Login"
    }
}}

{{! Start container (and add particular attributes for tabs vs accordion) }}
<div id="{{id}}" class="theme_boost_union-loginmethod {{#loginlayouttabs}}tab-pane fade{{#active}} show active{{/active}}{{/loginlayouttabs}} {{#loginlayoutaccordion}}card{{/loginlayoutaccordion}}" {{#loginlayouttabs}}role="tabpanel" aria-labelledby="{{id}}-tab"{{/loginlayouttabs}}>

    {{! Divider for vertical layout only (skip first method) }}
    {{#loginlayoutvertical}}{{^isfirst}}<div class="login-divider"></div>{{/isfirst}}{{/loginlayoutvertical}}

    {{! Accordion layout: Show header and start container }}
    {{#loginlayoutaccordion}}
    <div class="card-header" id="{{id}}-accordion-header">
        <h5 class="mb-0">
            <button class="btn btn-link {{^active}}collapsed{{/active}}" type="button" data-toggle="collapse" data-target="#{{id}}-accordion-content" {{#active}}aria-expanded="true"{{/active}}{{^active}}aria-expanded="false"{{/active}} aria-controls="{{id}}-accordion-content">
                <span class="login-heading text-break w-100">{{label}}</span>
            </button>
        </h5>
    </div>
    <div id="{{id}}-accordion-content" class="collapse {{#active}}show{{/active}}" aria-labelledby="{{id}}-accordion-header" data-parent="#login-layout-accordion"><div class="card-body">
    {{/loginlayoutaccordion}}
