@props([ 'name' => null, 'options' => [], 'value' => null, ]) @php $id = sprintf('%s-%s', $attributes->get('id', $name), uniqid()); $numberItemsPerRow = 3; $imagePaddingTop = null; if ($numberItemsPerRowAttr = Arr::get($attributes, 'number_items_per_row')) { $numberItemsPerRow = $numberItemsPerRowAttr; } if (! ($isWithoutAspectRatio = Arr::get($attributes, 'without_aspect_ratio'))) { $ratio = null; if (Arr::has($attributes, 'ratio')) { $ratio = Arr::get($attributes, 'ratio'); } if ($ratio) { $imagePaddingTop = match ($ratio) { '1:1' => 100, '3:4' => 75, '4:3' => 125, '16:9' => 56.25, '9:16' => 178, '16:10' => 62.5, '10:16' => 160, default => null, }; } } $col = min($numberItemsPerRow, 12); @endphp