<?php

declare(strict_types=1);

namespace App\Scenario;

use App\Util\ParsedCommand;
use Pkirillw\MaxBotApi\Builder\Message as MessageBuilder;
use Pkirillw\MaxBotApi\Scheme\Enum\Format;
use Pkirillw\MaxBotApi\Scheme\Update\MessageCreatedUpdate;

final class KeyboardScenario extends AbstractScenario
{
    public function handle(MessageCreatedUpdate $update, ParsedCommand $command): void
    {
        $this->api->messages->send(
            MessageBuilder::new()
                ->setChat($update->getChatId())
                ->setText('Клавиатура со всеми типами кнопок. Жми — увидишь callback payload.')
                ->setFormat(Format::Markdown)
                ->addKeyboard($this->keyboards->full()),
        );
    }
}
