<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['action', 'confirmTitle' => 'Delete this record?', 'confirmText' => 'This cannot be undone.']));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter((['action', 'confirmTitle' => 'Delete this record?', 'confirmText' => 'This cannot be undone.']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<form
    method="POST"
    action="<?php echo e($action); ?>"
    x-data
    x-on:submit.prevent="
        window.Swal.fire({
            title: <?php echo \Illuminate\Support\Js::from($confirmTitle)->toHtml() ?>,
            text: <?php echo \Illuminate\Support\Js::from($confirmText)->toHtml() ?>,
            icon: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Delete',
            confirmButtonColor: '#6e1423',
            cancelButtonColor: '#16130f',
        }).then((result) => { if (result.isConfirmed) { $el.submit(); } })
    "
>
    <?php echo csrf_field(); ?>
    <?php echo method_field('DELETE'); ?>
    <button type="submit" <?php echo e($attributes->merge(['class' => 'btn rounded-lg p-1.5 text-danger/70 transition-all duration-200 hover:scale-110 hover:bg-danger/10 hover:text-danger'])); ?> title="Delete">
        <i class="fa-solid fa-trash-can"></i>
    </button>
</form>
<?php /**PATH G:\Projects\ecommerce\resources\views/components/admin/delete-form.blade.php ENDPATH**/ ?>