export const NONE_SELECT_VALUE = "__none__";

export interface SelectOption {
  value: string;
  label: string;
}

export interface VariantSetQuery {
  variant_set_name?: string;
  reference_set_id?: string;
  study_id?: string;
}

export const DATA_FORMAT_OPTIONS = [
  { value: "DartSeq", label: "DartSeq" },
  { value: "VCF", label: "VCF" },
  { value: "Hapmap", label: "Hapmap" },
  { value: "tabular", label: "tabular" },
  { value: "JSON", label: "JSON" },
] as const;

export const FILE_FORMAT_OPTIONS = [
  { value: "application/json", label: "application/json" },
  { value: "text/csv", label: "text/csv" },
  { value: "text/tsv", label: "text/tsv" },
  { value: "application/flapjack", label: "application/flapjack" },
  { value: "application/excel", label: "application/excel" },
  { value: "application/zip", label: "application/zip" },
] as const;

export const ANALYSIS_TYPE_OPTIONS = [
  { value: "QC", label: "QC" },
  { value: "Annotation", label: "Annotation" },
  { value: "Filtering", label: "Filtering" },
  { value: "Imputation", label: "Imputation" },
] as const;

export interface VariantSetAnalysisItem {
  id?: string;
  analysisDbId?: string;
  analysisName?: string | null;
  type?: string | null;
  description?: string | null;
  software?: string[] | string | null;
  created?: string | null;
  updated?: string | null;
}

export interface VariantSetFormatItem {
  id?: string;
  formatDbId?: string;
  variant_set_id?: string;
  variantSetDbId?: string;
  dataFormat?: string | null;
  data_format?: string | null;
  fileFormat?: string | null;
  file_format?: string | null;
  fileURL?: string | null;
  fileurl?: string | null;
  expandHomozygotes?: boolean | null;
  expand_homozygotes?: boolean | null;
  sepPhased?: string | null;
  sep_phased?: string | null;
  sepUnphased?: string | null;
  sep_unphased?: string | null;
  unknownString?: string | null;
  unknown_string?: string | null;
}

export interface VariantSetRecord {
  id: string;
  variantSetDbId: string;
  variantSetName: string | null;
  variant_set_name: string | null;
  referenceSetDbId: string | null;
  reference_set_id: string | null;
  reference_set_name: string | null;
  studyDbId: string | null;
  study_id: string | null;
  study_name: string | null;
  variantCount: number | null;
  variant_count: number | null;
  callSetCount: number | null;
  callset_count: number | null;
  analysis_count: number | null;
  format_count: number | null;
  analysis?: VariantSetAnalysisItem[];
  availableFormats?: VariantSetFormatItem[];
}

export interface VariantSetDetail extends VariantSetRecord {
  analysis: VariantSetAnalysisItem[];
  availableFormats: VariantSetFormatItem[];
}
