<?php

namespace App\DTO\Settings;

final class TelegramDTO
{
    private string $botToken;
    private ?int $chatId;
    private string $ownerNotificationTemplate;
    private string $customerNotificationTemplate;
    private string $miniAppUrl;

    public function __construct(
        string $botToken,
        ?int $chatId,
        string $ownerNotificationTemplate,
        string $customerNotificationTemplate,
        string $miniAppUrl
    ) {
        $this->botToken = $botToken;
        $this->chatId = $chatId;
        $this->ownerNotificationTemplate = $ownerNotificationTemplate;
        $this->customerNotificationTemplate = $customerNotificationTemplate;
        $this->miniAppUrl = $miniAppUrl;
    }

    public function getBotToken(): string
    {
        return $this->botToken;
    }

    public function getChatId(): ?int
    {
        return $this->chatId;
    }

    public function getOwnerNotificationTemplate(): string
    {
        return $this->ownerNotificationTemplate;
    }

    public function getCustomerNotificationTemplate(): string
    {
        return $this->customerNotificationTemplate;
    }

    public function getMiniAppUrl(): string
    {
        return $this->miniAppUrl;
    }

    public function toArray(): array
    {
        return [
            'bot_token' => $this->botToken,
            'chat_id' => $this->chatId,
            'owner_notification_template' => $this->ownerNotificationTemplate,
            'customer_notification_template' => $this->customerNotificationTemplate,
            'mini_app_url' => $this->miniAppUrl,
        ];
    }
}
