{% sw_extends '@Storefront/storefront/component/account/register.html.twig' %}

{% block component_account_register_personal_account_fields %}
    {% block page_checkout_register_personal_guest %}
        <div class="form-check register-guest-control mb-3">
            {% block page_checkout_register_personal_guest_input %}
            <input type="checkbox"
                   class="form-check-input"
                   name="createCustomerAccount"
                   value="true"
                   id="personalGuest"
                   {% if config('core.loginRegistration.createCustomerAccountDefault') == 1 or data.getBoolean('createCustomerAccount') %}checked="checked"{% endif %}
                   data-form-field-toggle="true"
                   data-form-field-toggle-target=".js-form-field-toggle-guest-mode"
                   data-form-field-toggle-value="true">
            {% endblock %}

            {% block page_checkout_register_personal_guest_label %}
                <label class="custom-control-label"
                       for="personalGuest">
                {{ 'checkout.registerCustomermodeLabel'|trans|sw_sanitize }}
                </label>
            {% endblock %}
        </div>
    {% endblock %}

    {{ parent() }}
{% endblock %}

{% block component_account_register_create_account %}
    {# Block intentionally left blank to make the account creation configurable #}
{% endblock %}
