using adas_core.Domain.Enums;
using adas_core.Domain.Models.AppSettings;
using adas_core.Domain.Models.MongoModels;

namespace adas_core.Application.Services.Interfaces;

public interface IPermissionService
{
    public Task<DisplayPermissionTypes> GetPermissionsForDisplay(Display display, User user);
    public Task<DisplayPermissionTypes> GetPermissionsForUnit(string unitId, User user);
    public PanelPermissionTypes GetPermissionsForPanel(User user);
    public Task<PanelPermissionTypes> GetPermissionsForPanel(string user);

    Task<bool> HasAccessToDisplay(string username, PermissionEnum.RolesType role,
        PermissionEnum.SourcePermissionsEnum source, string displayId);

    Task<bool> HasAccessToUnit(string username, PermissionEnum.RolesType role,
        PermissionEnum.SourcePermissionsEnum source, string unitId);

    Task<bool> HasAccessToPanel(string username, PermissionEnum.RolesType role,
        PermissionEnum.SourcePermissionsEnum source);
}