<?php

declare(strict_types=1);

namespace PpPhp\Core\Platform\Foundation;

final class PlatformIdentity
{
    public function __construct(
        private readonly string $id,
        private readonly string $type,
        private readonly string $label
    ) {
    }

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

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

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

    public function toArray(): array
    {
        return [
            'id' => $this->id,
            'type' => $this->type,
            'label' => $this->label,
        ];
    }
}
