<?php

namespace Dalten\RuianToUir\Converter\Result;

use Dalten\RuianToUir\Converter\Field\FieldInterface;

readonly class AddRecord implements ResultInterface
{
    /**
     * @param string                                    $itemType   Typ záznamu (County, Region, Address, ...).
     * @param int                                       $identifier identifikátor (kód) záznamu
     * @param array<string, scalar|FieldInterface|null> $data       data záznamu
     */
    public function __construct(
        private string $itemType,
        private int $identifier,
        private array $data)
    {
    }

    /** {@inheritdoc} */
    public function getData(): array
    {
        return $this->data;
    }

    /** {@inheritdoc} */
    public function getItemType(): string
    {
        return $this->itemType;
    }

    /** {@inheritdoc} */
    public function getIdentifier(): int
    {
        return $this->identifier;
    }
}
