namespace SolutionErp.Application.Permissions.Dtos;

public record MenuNodeDto(
    string Key,
    string Label,
    string? ParentKey,
    int Order,
    string? Icon,
    bool CanRead,
    bool CanCreate,
    bool CanUpdate,
    bool CanDelete,
    bool IsVisible,            // [Mig 27] admin ẩn menu cho fe-user; fe-admin ignore filter này
    string? DisplayLabel,      // [Mig 27] override label cho fe-user; fe-admin luôn render Label gốc
    List<MenuNodeDto> Children);

public record PermissionDto(
    Guid Id,
    Guid RoleId,
    string MenuKey,
    bool CanRead,
    bool CanCreate,
    bool CanUpdate,
    bool CanDelete);

public record RoleDto(
    Guid Id,
    string Name,
    string? ShortName,
    string? Description,
    DateTime CreatedAt);

public record MenuItemDto(
    string Key,
    string Label,
    string? ParentKey,
    int Order,
    string? Icon,
    bool IsVisible,
    string? DisplayLabel);
