<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface UserAccessRepositoryInterface
{
    public function userHasCompanyAccess(string $userId, string $companyId): bool;

    public function branchBelongsToCompany(string $branchId, string $companyId): bool;

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

    /** @param list<array{company_id: string, branch_id: ?string, can_manage: bool, is_default: bool}> $rows */
    public function replaceForUser(string $userId, array $rows): void;
}
