import { IsArray, IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator';

export class UpdateRoleDto {
  @IsString()
  @IsOptional()
  @IsNotEmpty()
  name?: string;

  @IsString()
  @IsOptional()
  summary?: string;

  @IsString()
  @IsOptional()
  badge?: string;

  @IsString()
  @IsOptional()
  @IsIn(['primary', 'secondary', 'tertiary'])
  tone?: 'primary' | 'secondary' | 'tertiary';

  @IsString()
  @IsOptional()
  icon?: string;

  @IsArray()
  @IsOptional()
  permissions?: Array<{
    id: string;
    label: string;
    icon: string;
    description: string;
    values: Record<string, boolean | null>;
  }>;
}
