using CashLineERP.Contracts.Identity;

namespace CashLineERP.Application.Identity;

public interface IAdminUserRepository
{
    IReadOnlyCollection<AdminUserView> GetUsers(string? userTypeCode = null, bool includeInactive = true);

    AdminUserView? GetUser(long userId);

    IReadOnlyCollection<AdminRoleFunctionOptionResponse> GetRoleFunctionOptions(string? userTypeCode = null);

    IReadOnlyCollection<AdminPortalMenuSectionResponse> GetPortalMenuSections(bool includeDisabled = true);

    AdminFunctionConfigurationResponse UpdateFunctionGovernance(UpdateAdminFunctionGovernanceRequest request, long actorUserId);

    bool AnyFunctionEnabled(IReadOnlyCollection<string> functionCodes);

    void RecordUserAdministrationReportExport(long actorUserId, string formatCode, string? userTypeCode, string? roleCode);

    AdminUserView CreateUser(CreateAdminManagedUserRequest request, long actorUserId);

    AdminUserView ReplaceRoles(long userId, IReadOnlyCollection<string> roleCodes, IReadOnlyCollection<string>? functionCodes, long actorUserId);

    AdminUserView SuspendUser(long userId, long actorUserId, string reason);

    AdminUserView HoldUser(long userId, long actorUserId, string reason);

    AdminUserView ReinstateUser(long userId, long actorUserId, string reason);

    AdminUserView RevokeUser(long userId, long actorUserId, string reason);

    AdminUserView DeleteUser(long userId, long actorUserId, string reason);
}
