<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Vzdelavanie\Livewire\Components;

use Illuminate\Contracts\View\View;
use Livewire\Component;

/**
 * Class SearchText
 *
 * @package Seka\Portal\Modul\Vzdelavanie\Livewire\Components
 */
final class SearchText extends Component
{
    public ?string $searchText = null;

    /**
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function render(): View
    {
        return view('Vzdelavanie::livewire.components.search-text');
    }

    public function updatedSearchText(?string $value = null): void
    {
        $this->dispatch('filterByText', $value);
    }
}
