@php
$variant = $options['variant'] ?? 'info';
$padding = $options['padding'] ?? 'sm';
$dismissible = ! empty($options['dismissible']);
$rounded = $options['rounded'] ?? 'md';
$roundedCls = ['none' => 'rounded-0', 'sm' => 'rounded', 'md' => 'rounded-2', 'lg' => 'rounded-3'][$rounded] ?? '';
$icon = $data['icon'] ?? null;
@endphp
<div class="container py-{{ $padding }}">
    <div class="alert alert-{{ $variant }} {{ $roundedCls }} {{ $dismissible ? 'alert-dismissible fade show' : '' }} d-flex gap-3 align-items-start">
        @if($icon)<i class="{{ $icon }} fa-lg flex-shrink-0 mt-1"></i>@endif
        <div class="flex-grow-1">
            @if(! empty($data['title']))
                <strong class="d-block mb-1">{{ $data['title'] }}</strong>
            @endif
            <div>{!! e($data['message'] ?? '') !!}</div>
            @if(! empty($data['cta_text']) && ! empty($data['cta_link']))
                <a href="{{ localized_url($data['cta_link']) }}" class="btn btn-sm btn-{{ $variant }} mt-2">{{ $data['cta_text'] }}</a>
            @endif
        </div>
        @if($dismissible)<button type="button" class="btn-close" data-bs-dismiss="alert"></button>@endif
    </div>
</div>
