<?php

namespace App\Monitor\Action\Input;

use App\Monitor\Action\Command\DeleteMonitorCommand;
use OneToMany\RichBundle\Attribute\SourceRoute;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\InputInterface;

/** @implements InputInterface<DeleteMonitorInput, DeleteMonitorCommand> */
class DeleteMonitorInput implements InputInterface
{
    public function __construct(
        #[SourceRoute('monitorId')]
        public int $monitorId,
    ) {}

    public function toCommand(): CommandInterface
    {
        return new DeleteMonitorCommand(
            $this->monitorId
        );
    }
}
