namespace Application.Features.Director.Role.Permissions.Get
{
    public sealed class Response
    {
        public required string RoleID { get; set; }
        public string? RoleName { get; set; }

        public class PermissionGroup
        {
            public required string GroupName { get; set; }

            public class Checkbox
            {
                public string? DisplayValue { get; set; }
                public bool IsSelected { get; set; }
            }

            public List<Checkbox> Permissions { get; set; } = [];

            // 전체 선택 여부 (모든 권한이 선택됨)
            public bool IsAllSelected => Permissions.All(c => c.IsSelected);

            // 일부만 선택됨 (일부 권한만 선택됨)
            public bool IsPartialSelected => Permissions.Any(c => c.IsSelected) && !IsAllSelected;
        }

        public List<PermissionGroup> RoleClaims { get; set; } = [];
    }
}