<?php

namespace NoahVet\Reef\Phpunit\Fixture;

use NoahVet\Reef\Domain\Security\Model\Resource;
use NoahVet\Reef\Domain\Security\Model\ResourceGroup;
use NoahVet\Reef\Domain\Security\Model\ResourceType;

class PermissionFixture
{
    /**
     * @param string[] $allowedPermission
     */
    public function __construct(
        protected Resource|ResourceGroup $target,
        protected array $allowedPermission,
    ) {
    }

    public function getTarget(): ResourceGroup|Resource
    {
        return $this->target;
    }

    public function getResourceType(): ResourceType
    {
        return $this->target->getResourceType();
    }

    public function getTargetSlug(): string
    {
        return $this->target->getSlug();
    }

    /**
     * @return string[]
     */
    public function getAllowedPermission(): array
    {
        return $this->allowedPermission;
    }
}
