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

export class CreateRoleDto {
  @IsString()
  @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()
  permissions!: Array<{
    id: string;
    label: string;
    icon: string;
    description: string;
    values: Record<string, boolean | null>;
  }>;
}
