import {EComponentType} from '@/consts/enum'
export type TAgent = {
  address?: string|null
  agentId: string
  avatarUrl?: string|null
  avatarLogo?: string|null
  email?: string|null
  enabledChatBg?: boolean
  entName?: string|null
  isDefault: boolean
  isEnt: boolean
  entId?: number|string|null
  isNewEnt: boolean
  mobile?: string|null
  name: string
  position?: string|null
  qrCodeUrl?: string
}

export type TAgentShared = {
  address?: string,
  avatarUrl?: string,
  email?: string,
  entName?: string,
  isEnt?: boolean,
  mobile?: string,
  name?: string,
  position?: string,
  qrCodeUrl?: string,
  shareKey?: string
}


export type TComponentItem = {
  data: {
    id: string,
    index: number, // index 虽然维护着，但暂时没用到
    [property: string]: any;
  },
  enabled: boolean,
  type: EComponentType
}
export type TAgentDetail = {
  address?: string|null,
  agentId: string,
  avatarUrl?: string|null,
  avatarLogo?: string|null,
  components?: TComponentItem[],
  email?: string,
  enabledChatBg?: boolean,
  enabledPersonalKb?: boolean,
  entId?: string|number|null,
  entName?: string|null,
  greeting?: string,
  isDefault?: boolean,
  isEnt?: boolean,
  isNewEnt?: boolean,
  isSystemVoice?: boolean,
  mobile?: string,
  name?: string,
  personality?: string,
  position?: string|null,
  qrCodeUrl?: string|null,
  questionGuides?: string[],
  voiceId?: string
  voiceName?: string,
  isMineAgent: boolean
  deletedTip?: string|null // 如果是已删除状态时的提示词 ,
  status?:  'normal' | 'deleted' //  智能体状态：normal 正常/ deleted 已删除 ,
  toAgentId?: string|null  //  当是删除状态时，提示跳转至新的智能体 ID
}

export type TAgentContactCard = Pick<TAgentDetail, 'address'|'email'|'entName'|'mobile'|'name' | 'position' | 'qrCodeUrl'>

export type TEditAgentCharacter = Pick<TAgentDetail, 'enabledChatBg' | 'greeting' | 'personality' | 'questionGuides'| 'voiceId' | 'enabledPersonalKb'>


export type TAgentRequiredData = {
  "address"?: string;
  "agentId": string;
  "avatarLogo"?: string;
  "avatarUrl"?: string;
  "components"?: Array<{
    "data"?: {};
    "enabled"?: boolean;
    "type"?: string;
  }>;
  "email"?: string;
  "enabledChatBg"?: boolean;
  "enabledPersonalKb"?: boolean;
  "entId"?: number;
  "entName"?: string;
  "greeting"?: string;
  "isDefault"?: boolean;
  "isEnt"?: boolean;
  "isNewEnt"?: boolean;
  "mobile"?: string;
  "name"?: string;
  "personality"?: string;
  "position"?: string;
  "qrCodeUrl"?: string;
  "questionGuides"?: string[];
  "voiceId"?: string;
  "voiceName"?: string;
};
