export interface CharacterDNA {
  id: string;                    // UUID v4
  createdAt: string;             // ISO 8601
  updatedAt: string;             // ISO 8601
  status: 'active' | 'inactive' | 'creating';

  // 1. Temel Kimlik
  identity: {
    name: string;
    age: number;
    nationality: string;
    city: string;
    occupation: string;
    personality_tags: string[];
    mbti: string;
    backstory: string;
  };

  // 2. Fiziksel Ölçüler
  physicalMeasurements: {
    height_cm: number;
    weight_kg: number;
    body_type: string;
    measurements: { bust: number; waist: number; hips: number };
  };

  // 3. Cilt Haritası HEX
  skinMap: {
    base: string;      // HEX
    shadow: string;    // HEX
    highlight: string; // HEX
  };

  // 4. Yüz Anatomisi
  faceAnatomy: {
    eye_shape: string;
    eye_color: string;
    eyebrow_shape: string;
    nose_type: string;
    lip_shape: string;
    cheekbones: string;
    jawline: string;
    distinctive_marks: string[];
  };

  // 5. Saç DNA
  hairDNA: {
    style: string;
    length: string;
    texture: string;
    root_color: string;      // HEX
    mid_color: string;       // HEX
    highlight_color: string; // HEX
  };

  // 6. Vücut Biyometrisi
  bodyBiometrics: {
    body_type_detail: string;
    posture: string;
    skin_texture: string;
  };

  // 7. Profil Görünümü
  profileView: {
    best_angle: string;
    signature_pose: string;
  };

  // 8. İfade & Hareket
  expressionMotion: {
    default_expression: string;
    smile_type: string;
    gaze_style: string;
  };

  // 9. Makyaj Stili
  makeupStyle: {
    philosophy: string;
    skin_finish: string;
    colors: { primary: string; secondary: string; accent: string }; // HEX
  };

  // 10. Moda Stili
  fashionStyle: {
    aesthetic: string;
    main_colors: string[];  // HEX
    signature_pieces: string[];
  };

  // 11. Teknik Ayarlar
  technicalSettings: {
    camera_body: string;
    portrait_lens: string;
    full_body_lens: string;
    film_stock: string;
  };

  // 12. Karakter Bazlı Telegram API Credentials
  apiCredentials?: {
    telegramApiId: number;
    telegramApiHash: string;
  };
}

export type ConversationStyleType = 'tipik_turk_kizi' | 'tripli' | 'alingan' | 'neseli' | 'gizemli' | 'soguk' | 'ilgili' | 'oyuncu' | 'custom';

export interface ConversationProfile {
  characterId: string;
  style: ConversationStyleType;
  customStyleDescription?: string;
  toneOfVoice: {
    formality: 'casual' | 'semi-formal';
    emoji_frequency: 'low' | 'medium' | 'high';
    message_length: 'short' | 'medium' | 'long';
    humor_level: 'none' | 'subtle' | 'frequent';
    flirtation_level: 'none' | 'subtle' | 'moderate' | 'high';
  };
  languagePatterns: {
    common_phrases: string[];
    filler_words: string[];
    reaction_templates: Record<string, string[]>;
  };
  salesBehavior: {
    min_messages_before_pitch: number;
    cooldown_minutes: number;
    pitch_style: 'subtle' | 'playful' | 'direct';
  };
}

export interface MasterJSONPrompt {
  characterId: string;
  subject: string;
  clothing: string;
  environment: string;
  lighting: string;
  camera: string;
  aesthetic: string;
  negative_prompt: string;
  createdAt: string;
  updatedAt: string;
}


export interface ConversationPersona {
  character_profile: {
    name: string;
    age: number;
    location: string;
    occupation: string;
    mbti: string;
    personality_tags: string[];
    backstory: string;
  };
  language_rules: {
    general_rules: string[];
    abbreviations: Record<string, string>;
    writing_style: string[];
  };
  conversation_scenarios: Record<string, {
    description?: string;
    responses: string[];
  }>;
  contextual_expressions: Record<string, string[]>;
  message_length_patterns: Record<string, {
    when: string;
    examples: string[];
  }>;
  do_not_use: {
    forbidden_phrases: string[];
    style_mistakes: string[];
  };
  training_notes: Record<string, string>;
}
