CluPilotCloud/resources/views/livewire/confirm-close-account.blade...

44 lines
1.9 KiB
PHP

{{-- R24: the header and the footer are outside the scroll region, and both
branches of this modal use the same two slots the alternative is two
modals in one file, which is how the two drift apart. --}}
<x-ui.modal>
<x-slot:header>
<div class="flex items-start gap-3">
<span @class([
'grid size-10 shrink-0 place-items-center rounded-lg',
'bg-warning-bg text-warning' => $blocked,
'bg-danger-bg text-danger' => ! $blocked,
])>
<x-ui.icon name="alert-triangle" class="size-5" />
</span>
<div class="min-w-0">
<h3 class="text-base font-semibold text-ink">
{{ $blocked ? __('settings.close_blocked_title') : __('settings.close_title') }}
</h3>
<p class="mt-1 text-sm text-muted">
{{ $blocked ? __('settings.close_blocked') : __('settings.close_body') }}
</p>
</div>
</div>
</x-slot:header>
@if (! $blocked)
<div>
<label class="text-sm text-body">{{ __('settings.close_confirm_label', ['word' => __('settings.close_keyword')]) }}</label>
<input type="text" wire:model="confirmWord" class="mt-1.5 w-full rounded-md border border-line-strong bg-surface px-3 py-2 text-sm text-ink" />
@error('confirmWord')<p class="mt-1 text-xs text-danger">{{ $message }}</p>@enderror
</div>
@endif
<x-slot:footer>
<div class="flex justify-end gap-3">
<x-ui.button variant="secondary" x-on:click="Livewire.dispatch('closeModal')">{{ __('settings.keep') }}</x-ui.button>
@if (! $blocked)
<x-ui.button variant="danger" wire:click="closeAccount" wire:loading.attr="disabled">
{{ __('settings.close_confirm') }}
</x-ui.button>
@endif
</div>
</x-slot:footer>
</x-ui.modal>