<?php

namespace App\View\Form;

use Illuminate\View\Component;

class SaveButton extends Component
{

    public function __construct(public string $form = '')
    {
    }

    public function render()
    {
        return <<<'HTML'
            <button @if($form) form="{{$form}}" @endif type="submit" class="flex items-center transition-all justify-center w-8 h-8 bg-primary-700 hover:bg-primary-600 rounded" x-tooltip="`speichern`">
                <x-ui::sprite class="w-4 h-4 text-white" src="save"></x-ui::sprite>
            </button>
        HTML;
    }
}
