@props([ 'permission'=>'dashboard.view', 'href'=>'', 'icon'=>'', 'title'=>'', 'type'=>'', 'modal'=>false, 'modaltitle'=>'تعديل عنصر', 'modallevel'=>'1', ]) @can($permission) @php $def_icons=[ 'edit'=>'ki-filled ki-pencil', 'delete'=>'ki-filled ki-trash', 'show'=>'ki-filled ki-search-list', 'print'=>'ki-filled ki-printer', 'follow'=>'ki-filled ki-search-list', 'export'=>'ki-filled ki-file-up', 'deactivate'=>'ki-filled ki-lock', 'activate'=>'ki-filled ki-check', ]; $icon= $def_icons[$type] ?? $icon; $classes='kt-menu-link '; $isFollow = $type === 'follow'; if ($isFollow) { $classes .= ' rounded-lg border border-blue-200 bg-blue-50 hover:bg-blue-100 '; } if($modal){ $classes.=' OpenModal'; } $isBulkAction = ($attributes->get('data-bulk-action') ?? '') === 'action'; $livewireEvent = (string) ($attributes->get('data-livewire-event') ?? ''); $shouldBypassBulkConfirm = $isBulkAction && $livewireEvent !== ''; $finalAttributes = $shouldBypassBulkConfirm ? $attributes->except('data-bulk-action') : $attributes; @endphp @if($type == 'separator')
@else @endif @endcan