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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'align' => 'right',        // 'right' | 'left'
    'width' => 'w-56',         // any Tailwind width class
    'closeOnClick' => true,    // close menu when clicking an item
    'z' => 'z-50',             // z-index utility
    'disabled' => false,       // disable opening
]));

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(([
    'align' => 'right',        // 'right' | 'left'
    'width' => 'w-56',         // any Tailwind width class
    'closeOnClick' => true,    // close menu when clicking an item
    'z' => 'z-50',             // z-index utility
    'disabled' => false,       // disable opening
]), '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); ?>

<?php
    $alignClass = $align === 'left'
        ? 'origin-top-left left-0'
        : 'origin-top-right right-0';
?>

<div
    x-data="{ open: false, closeOnClick: <?php echo e($closeOnClick ? 'true' : 'false'); ?> }"
    @keydown.escape.window="open = false"
    @click.outside="open = false"
    class="relative inline-block text-left"
>
    
    <div
        @click="if (!<?php echo e($disabled ? 'true' : 'false'); ?>) open = !open"
        @keydown.enter.prevent="if (!<?php echo e($disabled ? 'true' : 'false'); ?>) open = !open"
        @keydown.space.prevent="if (!<?php echo e($disabled ? 'true' : 'false'); ?>) open = !open"
        role="button"
        :aria-expanded="open"
        aria-haspopup="true"
    >
        <?php echo e($trigger ?? ''); ?>

    </div>

    
    <div
        x-cloak
        x-show="open"
        x-transition:enter="transition ease-out duration-150"
        x-transition:enter-start="opacity-0 translate-y-1"
        x-transition:enter-end="opacity-100 translate-y-0"
        x-transition:leave="transition ease-in duration-100"
        x-transition:leave-start="opacity-100 translate-y-0"
        x-transition:leave-end="opacity-0 translate-y-1"
        class="absolute mt-2 <?php echo e($alignClass); ?> <?php echo e($z); ?> <?php echo e($width); ?>"
    >
        <div
            class="rounded-md bg-white border border-gray-200 shadow-lg p-1"
            @click="if (closeOnClick) open = false"
            role="menu"
            tabindex="-1"
        >
            <?php echo e($content ?? ''); ?>

        </div>
    </div>
</div>
<?php /**PATH D:\WORK\MAARIFA\ANGO\DESKTOP\V4\ango-desktop\resources\views/components/basics/dropdown.blade.php ENDPATH**/ ?>