@props(['id', 'title' => 'Xác nhận', 'message' => '', 'confirmText' => 'Xác nhận', 'cancelText' => 'Hủy bỏ', 'confirmBg' => 'bg-red-600 hover:bg-red-700'])

<x-modal :id="$id" :title="$title" maxWidth="md" hideHeader="true">
    <div class="flex items-start gap-4">
        <div class="flex-shrink-0 flex items-center justify-center w-12 h-12 bg-red-100 rounded-full">
            <svg class="w-6 h-6 text-red-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
            </svg>
        </div>
        <div class="flex-1 mt-1">
            <h3 class="text-lg font-bold text-gray-900">{{ $title }}</h3>
            <p class="text-sm text-gray-600 mt-2 leading-relaxed" id="{{ $id }}-message">
                {{ $message }}
            </p>
        </div>
    </div>

    <x-slot name="footer">
        <form id="{{ $id }}-form" method="POST" class="w-full sm:w-auto">
            @csrf
            @method('DELETE')
            <button type="submit" id="{{ $id }}-confirm-btn" class="w-full sm:w-auto inline-flex items-center justify-center text-white font-bold py-2.5 px-6 rounded-xl text-sm transition-colors shadow-md shadow-red-500/10 min-w-[120px] h-[42px] {{ $confirmBg }}">{{ $confirmText }}</button>
        </form>
        <button type="button" onclick="closeModal('{{ $id }}')" class="w-full sm:w-auto inline-flex items-center justify-center bg-white border border-[#d9dfe7] hover:bg-gray-50 text-[#1a2b49] font-bold py-2.5 px-6 rounded-xl text-sm transition-colors shadow-sm min-w-[120px] h-[42px]">{{ $cancelText }}</button>
    </x-slot>
</x-modal>
