<?php

declare(strict_types=1);

namespace Seka\Terminy\Listeners\Udalost;

use Seka\Terminy\Events\Udalost\Udalost;
use Seka\Terminy\Dtos\Factory\UdalostDTOFactory;

/**
 *
 */
final class ZrusitUdalostVKalendari extends UdalostVKlendari
{
    /**
     * @param \Seka\Terminy\Events\Udalost\Udalost $event
     */
    public function handle(Udalost $event): void
    {
        $udalost = UdalostDTOFactory::make($event->udalost);

        $this->calendarService->deleteEvent($udalost);
    }
}
