<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_users_permissions %}
<sw-page class="sw-users-permissions">
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_users_permissions_smart_bar_header %}
    <template #smart-bar-header>
        <h2>
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_users_permissions_smart_bar_header_title_text %}
            {{ $tc('sw-settings.index.title') }}
            <sw-icon
                name="regular-chevron-right-xs"
                small
            />
            {{ $tc('sw-users-permissions.general.label') }}
            {% endblock %}
        </h2>
    </template>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_users_permissions_smart_bar_actions %}
    <template #smart-bar-actions>
        <sw-button-process
            variant="primary"
            :is-loading="isLoading"
            :process-success="isSaveSuccessful"
            :disabled="!acl.can('users_and_permissions.editor')"
            @click="onSave"
            @update:process-success="onSaveFinish"
        >
            {{ $tc('global.default.save') }}
        </sw-button-process>
    </template>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_users_permissions_content %}
    <template #content>
        <sw-card-view>
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_users_permissions_content_user_list %}
            <sw-users-permissions-user-listing
                ref="userListing"
            />
            <sw-users-permissions-role-listing
                ref="roleListing"
                @get-list="reloadUserListing"
            />
            <sw-users-permissions-configuration
                ref="configuration"
                @loading-change="onChangeLoading"
            />
            {% endblock %}
        </sw-card-view>
    </template>
    {% endblock %}
</sw-page>
{% endblock %}
