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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'icon' => null,        // e.g. 'ph ph-pencil'
    'href' => null,        // if set, renders an <a>
    'variant' => 'default', // 'default' | 'danger' | 'success'
    'target' => null,
]));

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(([
    'icon' => null,        // e.g. 'ph ph-pencil'
    'href' => null,        // if set, renders an <a>
    'variant' => 'default', // 'default' | 'danger' | 'success'
    'target' => null,
]), '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
    $base = 'flex w-full items-center gap-2 px-3 py-2 text-sm rounded-md';
    $states = 'hover:bg-gray-50 focus:bg-gray-50 focus:outline-none';
    $text = $variant === 'danger' ? 'text-red-600 hover:text-red-700' : ($variant === 'success' ? 'text-green-600 hover:text-green-700' : 'text-gray-700 hover:text-gray-900');
    $classes = "$base $states $text";
    
    // Check if it's an external URL (starts with http:// or https://)
    $isExternal = !empty($href) && (str_starts_with($href, 'http://') || str_starts_with($href, 'https://'));
?>
        
<!--[if BLOCK]><![endif]--><?php if($href): ?>
    <a href="<?php echo e($href); ?>" <?php echo e($attributes->merge(['class' => $classes, 'role' => 'menuitem', 'tabindex' => '-1'])); ?> <?php echo e($target ? 'target="_blank"' : ''); ?> <?php if(!$isExternal): ?> wire:navigate <?php endif; ?>>
        <!--[if BLOCK]><![endif]--><?php if($icon): ?><i class="<?php echo e($icon); ?> text-base"></i><?php endif; ?><!--[if ENDBLOCK]><![endif]-->
        <span><?php echo e($slot); ?></span>
    </a>
<?php else: ?>
    <button type="button" <?php echo e($attributes->merge(['class' => $classes, 'role' => 'menuitem'])); ?>>
        <!--[if BLOCK]><![endif]--><?php if($icon): ?><i class="<?php echo e($icon); ?> text-base"></i><?php endif; ?><!--[if ENDBLOCK]><![endif]-->
        <span><?php echo e($slot); ?></span>
    </button>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
<?php /**PATH D:\WORK\MAARIFA\ANGO\DESKTOP\V4\ango-desktop\resources\views/components/basics/dropdown-item.blade.php ENDPATH**/ ?>