@props([
    // Chart.js config as a PHP array. Colours may use "token:accent" /
    // "token:accent/0.12" strings, resolved from CSS design tokens at runtime.
    'config',
    'label' => null,
])
<div
    x-data="chart(@js($config))"
    @if ($label) role="img" aria-label="{{ $label }}" @endif
    {{ $attributes->merge(['class' => 'relative']) }}
>
    <canvas x-ref="canvas"></canvas>
</div>
