<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiAdmin\Types\Dropshipment;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;

#[Type]
class Dropshipment
{
    public function __construct(
        public array $dropshipment,
    ) {
    }

    #[Field(description: 'ID.')]
    public function getId(): int
    {
        return $this->dropshipment['id'];
    }

    #[Field(description: 'Typ.')]
    public function getType(): string
    {
        return $this->dropshipment['type'];
    }

    #[Field(description: 'Název.')]
    public function getName(): string
    {
        return $this->dropshipment['name'];
    }

    #[Field(description: 'Aktivní.')]
    public function getActive(): bool
    {
        return (bool) $this->dropshipment['active'];
    }
}
