export declare interface OptionConfigType {
  type?: number;
  price?: number;
  title?: string;
  gradient?: string;
  image_url?: string[];
  child_area?: null;
  option_type?: number;
  instructions?: string[];
  binding_goods_id?: string;
  limit_right_content?: string;
}

// 矩阵的 options 选项
export declare interface IMatrixListOption {
  // 包含 HTML 标签的字符串，例如 "<p>选项1</p>"
  option: string;
  is_other: number;
  is_fixed: number;
  is_remove_other: number;
  level: number;
  option_key: string;
  option_index: string;
  option_code: string;
  option_config: OptionConfigType;
  parent_option_index: number;
  children: null;
}
// List/questions/options
declare interface IQuestionOption {
  type: number;
  cite_type: number;
  relation_type: number;
  relation_out_scope: number[];
  relation_last_scope: number;
  relation_first_scope: number;
  relation_question_index: number;
  options: IMatrixListOption[];
}

// 答案 question
export declare interface IQuestion<QuestionConfig = IBaseConfig> {
  error: string;
  answer?: unknown;
  id?: string;
  title?: string;
  stem?: string;
  other?: string;
  // 隐藏的选项
  hideOptions: string[];
  // options 列表项，第一个是默认
  list: IQuestionOption[];
  question_index?: number;
  question_type?: number;
  // 如果没有自定义类型，那么就直接用基础 config 类型
  config: QuestionConfig;
  created_at?: string;
  created_user_id?: number;
  updated_user_id?: number | null;
  survey_id?: number;
  logic_config?: LogicConfig;
  options: IQuestionOption[];
  questions: IQuestionOption[];
  associate?: any[];
  logics_has?: string | null;
  last_option_index?: number;
  question_code?: string;
  question_value?: string;
  question_tag?: string;
  planet_id?: string;
  permissions?: any | null;
}
