@php
    $breadcrumbs = [
        ['label' => __('common.home'), 'url' => route('dashboard.index')],
        ['label' => __('tenant_access.title')],
    ];
@endphp

<x-ui.layout.page
    :title="__('tenant_access.title')"
    :subtitle="__('tenant_access.subtitle')"
    page-icon="fe fe-shield-off"
    :breadcrumbs="$breadcrumbs"
>
    <div class="card border-0 shadow-sm" style="max-width: 640px;">
        <div class="card-body p-4 p-md-5">
            <div class="d-flex align-items-start gap-3 mb-4">
                <span
                    class="avatar avatar-lg rounded d-inline-flex align-items-center justify-content-center flex-shrink-0"
                    style="background: {{ config('theme.gradients.info') }};">
                    <i class="fe fe-lock text-white fs-24"></i>
                </span>
                <div>
                    <h4 class="fw-semibold mb-2" style="color: {{ config('theme.colors.text') }};">
                        @if ($reason === 'tenant')
                            {{ __('tenant_access.no_tenant_title') }}
                        @else
                            {{ __('tenant_access.module_title', ['module' => \Illuminate\Support\Facades\Lang::has('modules.catalog.'.$moduleSlug.'.name') ? __('modules.catalog.'.$moduleSlug.'.name') : $moduleSlug]) }}
                        @endif
                    </h4>
                    <p class="text-muted mb-0">
                        {{ $reason === 'tenant' ? __('tenant_access.no_tenant_body') : __('tenant_access.module_body') }}
                    </p>
                </div>
            </div>

            <div class="d-flex flex-wrap gap-2">
                <x-ui.buttons.primary :href="$upgradeUrl" icon="fe fe-zap">
                    {{ __('tenant_access.upgrade') }}
                </x-ui.buttons.primary>
                <x-ui.buttons.secondary :href="route('dashboard.index')" icon="fe fe-home">
                    {{ __('tenant_access.back_dashboard') }}
                </x-ui.buttons.secondary>
            </div>
        </div>
    </div>
</x-ui.layout.page>
