<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface ProfileRepositoryInterface
{
    /** @return array<string, mixed>|null */
    public function findByRoleAndPage(string $roleId, string $pageId): ?array;

    /** @return list<array<string, mixed>> */
    public function listByRole(string $roleId): array;

    public function savePermission(string $roleId, string $pageId, bool $canView, bool $canCreate, bool $canEdit, bool $canDelete): void;

    /**
     * @return list<array<string, mixed>>
     */
    public function getPermissionsForUser(string $userId): array;

    public function userIsAdministrator(string $userId): bool;
}
