<?php

namespace App\View\Ui;

use Illuminate\View\Component;

class Sprite extends Component
{

    public function __construct(
        public string $src = '',
    ) {
    }

    public function render()
    {
        return <<<'HTML'
            <svg {{ $attributes->merge(['class' => 'fill-current']) }}"><use xlink:href="/sprite.svg#{{$src}}" /></svg>
        HTML;
    }
}