@props([ 'id', 'title' => null, 'description' => null, 'width' => 'lg', 'side' => 'right', 'onClose' => null, ]) @php $widths = [ 'sm' => 'max-w-sm', 'md' => 'max-w-md', 'lg' => 'max-w-lg', 'xl' => 'max-w-xl', '2xl' => 'max-w-2xl', '3xl' => 'max-w-3xl', 'full' => 'max-w-full', ]; $widthClass = $widths[$width] ?? $widths['lg']; $isLeft = $side === 'left'; $justifyClass = $isLeft ? 'justify-start' : 'justify-end'; $translateClosed = $isLeft ? '-translate-x-full' : 'translate-x-full'; $borderClass = $isLeft ? 'border-r' : 'border-l'; @endphp
merge(['class' => "admin-drawer fixed inset-0 w-screen h-screen z-[1000] opacity-0 pointer-events-none transition-opacity duration-300 [&.active]:opacity-100 [&.active]:pointer-events-auto flex $justifyClass"]) }}>
@if($title)

{{ $title }}

@endif @if($description)

{{ $description }}

@endif
{{ $slot }}
@if(isset($footer))
{{ $footer }}
@endif