@php
$color = $options['color'] ?? 'light';
$padding = $options['padding'] ?? 'lg';
$alignment = $options['alignment'] ?? 'center';
$style = $options['style'] ?? 'large';
$showMark = $options['show_quote_mark'] ?? true;
$avatar = ! empty($data['avatar']) ? asset('storage/' . $data['avatar']) : null;
$wrapClass = match($style) {
    'bordered' => 'border-start border-4 border-primary ps-3',
    'card'     => 'border rounded p-4 bg-body shadow-sm',
    'large'    => '',
    default    => '',
};
@endphp
<section class="page-block-quote py-{{ $padding }} {{ pb_bg_class($color) }} text-{{ $alignment }}">
    <div class="container" style="max-width: 800px;">
        <figure class="mb-0 {{ $wrapClass }}">
            @if($showMark)<i class="fas fa-quote-left fa-2x text-primary opacity-50 mb-3"></i>@endif
            <blockquote class="blockquote {{ $style === 'large' ? 'fs-3 fw-light fst-italic' : '' }}">
                <p class="mb-3">{{ $data['quote'] ?? '' }}</p>
            </blockquote>
            @if(! empty($data['author']))
                <figcaption class="blockquote-footer mt-3 d-flex align-items-center gap-2 {{ $alignment === 'center' ? 'justify-content-center' : '' }}">
                    @if($avatar)<img src="{{ $avatar }}" class="rounded-circle" style="width:48px;height:48px;object-fit:cover;">@endif
                    <span>
                        <strong>{{ $data['author'] }}</strong>
                        @if(! empty($data['role'])), <cite>{{ $data['role'] }}</cite>@endif
                    </span>
                </figcaption>
            @endif
        </figure>
    </div>
</section>
