<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiShared\Types\User;

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

#[Type]
class UserAddress
{
    public function __construct(public readonly array $userAddress)
    {
    }

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

    #[Field(description: 'Jméno')]
    public function getName(): ?string
    {
        return $this->userAddress['delivery_name'] ?? null;
    }

    #[Field(description: 'Příjmení')]
    public function getSurname(): ?string
    {
        return $this->userAddress['delivery_surname'] ?? null;
    }

    #[Field(description: 'Firma')]
    public function getFirm(): ?string
    {
        return $this->userAddress['delivery_firm'] ?? null;
    }

    #[Field(description: 'Ulice')]
    public function getStreet(): ?string
    {
        return $this->userAddress['delivery_street'] ?? null;
    }

    #[Field(description: 'Město')]
    public function getCity(): ?string
    {
        return $this->userAddress['delivery_city'] ?? null;
    }

    #[Field(description: 'PSČ')]
    public function getZip(): ?string
    {
        return $this->userAddress['delivery_zip'] ?? null;
    }

    #[Field(description: 'Země')]
    public function getCountry(): ?string
    {
        return $this->userAddress['delivery_country'] ?? null;
    }

    #[Field(description: 'Měna')]
    public function getCurrency(): ?string
    {
        return $this->userAddress['delivery_currency'] ?? null;
    }

    #[Field(description: 'Telefon')]
    public function getPhone(): ?string
    {
        return $this->userAddress['delivery_phone'] ?? null;
    }

    #[Field(description: 'Stát')]
    public function getState(): ?string
    {
        return $this->userAddress['delivery_state'] ?? null;
    }

    #[Field(description: 'Email')]
    public function getEmail(): ?string
    {
        return $this->userAddress['delivery_email'] ?? null;
    }

    #[Field(description: 'Upřesnění adresy')]
    public function getCustomAddress(): ?string
    {
        return $this->userAddress['delivery_customAddress'] ?? null;
    }
}
