<?php

namespace MintyPHP\Repository\Access;

interface RoleAssignableRoleRepositoryInterface
{
    /** @return int[] */
    public function listAssignableRoleIdsByRoleId(int $roleId): array;

    /**
     * Union of assignable role IDs across multiple roles (e.g. all roles of an actor).
     * @param int[] $roleIds
     * @return int[]
     */
    public function listAssignableRoleIdsByRoleIds(array $roleIds): array;

    /**
     * Atomic replace: delete all + re-insert.
     * @param int[] $assignableRoleIds
     */
    public function replaceForRole(int $roleId, array $assignableRoleIds): bool;
}
