export type researchTerms = {
  id: number;
  created_at: number;
  updated_at: number;
  type: number;
  title: string;
  color: number;
  meta: string;
  guid: string;
  owner: number;
  comment: string;
  ispublic: number;
  stt: number;
  project_version: number;
  organ_code: number;
  project_relations: null;
  item_state: number;
  table_columns: string;
  tags: string;
  repo_index: number;
};
export type options = [{ value: string; title: string }];
export type items_main = [
  {
    key: string;
    label: string;
    type: string;
    placeholder: string;
    required: string;
    classes: string;
    inputClass: string;
    multi_select: string;
    options: options[];
  }
];
export type items_more = [
  {
    key: string;
    label: string;
    type: string;
    placeholder: string;
    required: number | string;
    classes: string;
    inputClass: string;
    multi_select: number | string;
    options: options[];
  }
];
export type form = {
  title: string;
  key: string;
  items_main: items_main[];
  items_more: items_more[];
};
export type contextMenu = [
  { key: string; title: string; icon: string; form: form }
];
export type filter = [
  { title: string; filter_key: string; source_key: string; by_more: number }
];
export type advance = [
  {
    key: string;
    label: string;
    tag: string;
    placeholder: string;
    labelClass: string;
    inputClass: string;
    options: [];
  }
];
export type lists = [
  {
    title: string;
    list_key: string;
    filter_key: string;
    icon: string;
    key: string;
    number: number;
    label: string;
    type: string;
    placeholder: string;
    required: number | string;
    classes: number | string;
    multi_select: number | string;
    url_GET: string;
  }
];
export type researchSchemaRes = {
  status: number;
  message: string;
  postion: number;
  meta: null;
  data: {
    dataset: researchActiveSchema[];
  };
};

export type researchActiveSchema = {
  key: string;
  routeName: string;
  searchContent: string;
  label: string;
  description: string;
  contextMenu: contextMenu[];
  summary: null;

  filter: filter[];
  domain: {
    tags: { عنوان: string; منبع: string; تاریخ: string };
    domain: domain;
  };
  advance: advance[];
  lists: lists[];
  tabs: [
    {
      title: string;
      key: string;
      url_GET: string;
    }
  ];
};
export type domain = { label: string; key: string };

export type table_actions = [
  {
    icon: string;
    title: string;
    key: string;
    "v-can": string;
    type: string;
    api_items: {
      data_type: string;
      ref_key: string;
      id: string;
      title: string;
    };
    toggle_icons: { icon1: string; icon2: string };
    link_route: { id: string; name: string; key: string };
  }
];
export type table_columns = [
  {
    key: string;
    title: string;
    width: number | string;
    textAlign: string;
    isLink: boolean;
    link_route: { id: string; name: string; key: string };
    trancate_word: 50;
  }
];

export type domainActive = {
  label: string;
  tag: string;
  key: string;
  field_collapse: string;
  table_actions: table_actions[];
  table_columns: table_columns[];
};
export type summary = {
  title: string;
  key: string;
  options: [{ key: string; label: string; type: string }];
};
export type items = [
  {
    key: string;
    items: [
      {
        key: string;
        source_key: string;
        label: string;
        style: string;
        hilight_key: string;
        link_route: { id: string; name: string; key: string };
      }
    ];
  }
];
export type actions = [
  {
    icon: string;
    title: string;
    key: string;
    "v-can": string;
    type: string;
    api_items: {
      data_type: string;
      ref_key: string;
      id: string;
      title: string;
    };
    toggle_icons: {
      icon1: string;
      icon2: string;
    };
    link_route: {
      id: string;
      name: string;
      key: string;
    };
  }
];
export type search_content = {
  items: items[];
  actions: actions[];
};
export type searchActiveTab = {
  key: string;
  routeName: string;
  searchContent: string;
  label: string;
  description: string;
  showTableList: number;
  summary: summary;
  filter: filter[];
  domain: {
    tags: {
      قانون: string;
      عنوان: string;
      متن: string;
      سال: string;
      مقنن: string;
      منبع: string;
      مصوب: string;
      تاریخ: string;
    };
    domain: domainActive[];
  };
  advance: advance[];
  searchType: [
    { key: string; label: string },
    {
      key: string;
      description: string;
      label: string;
    },
    {
      key: string;
      description: string;
      label: string;
    },
    {
      key: string;
      description: string;
      label: string;
      item: {
        label: string;
        type: string;
        component: string;
      };
    },
    {
      key: string;
      description: string;
      label: string;
    }
  ];
  search_content: search_content;
  lists: lists[];
};
export type selectionFilterItems = [];
export type researchQuery = [
  {
    _index: string;
    _id: string;
    _score: null;
    _ignored: [string];
    _source: {
      research_type: string;
      research_key: string;
      service: string;
      ref_key: string;
      ref_id: string;
      text_position: string;
      address: string;
      date_create: number;
      text_main: string;
      username: string;
      take_type: string;
      text_user: string;
      user_create: number;
      title: null;
      text_target: null;
      text_subject: null;
      text_verb: null;
      subject_public: null;
      subject_specific: null;
      time_edit: number;
      date_edit: string;
      user_edit: number;
      user: {
        id: number;
        user_id: number;
        first_name: string;
        last_name: string;
        username: string;
        full_name: string;
        avatar: string;
        color: string;
      };
    };
    sort: [number];
  }
];