{{-- $variants: array of Modules\Core\Catalog\Services\ProductIndexer's mapVariant() shape (id, options: [{option, value, meta}], ...) — plain arrays, not Eloquent models, since this is fed from Modules\Core\Catalog\Services\ProductService. Use this instead of for options that aren't a color (no meta.hex), where a swatch dot has nothing meaningful to show. --}} @props(['variants', 'option' => null])
@if($option)

{{ $option }}

@endif
@foreach($variants as $variant) @php $value = $variant['options'][0] ?? null; $label = $value['value'] ?? ''; @endphp {{ $label }} @endforeach