import type { Contact } from "@/lib/api/types.gen";

export const NONE_SELECT_VALUE = "__none__";

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

export type StudyContactRow = Contact & {
  contactDbId: string;
};

export interface StudySeasonRow {
  seasonDbId: string;
  label: string;
}

export interface TrialSelectOption extends SelectOption {
  programDbId: string | null;
  programName: string | null;
}

export interface StudyRecord {
  id: string;
  studyDbId: string;
  studyName: string | null;
  study_name: string | null;
  studyCode: string | null;
  study_code: string | null;
  studyType: string | null;
  study_type: string | null;
  studyDescription: string | null;
  study_description: string | null;
  studyPUI: string | null;
  studypui: string | null;
  documentationURL: string | null;
  documentationurl: string | null;
  startDate: string | null;
  start_date: string | null;
  endDate: string | null;
  end_date: string | null;
  active: boolean | null;
  license: string | null;
  culturalPractices: string | null;
  cultural_practices: string | null;
  observationUnitsDescription: string | null;
  observation_units_description: string | null;
  cropDbId: string | null;
  crop_id: string | null;
  cropName: string | null;
  crop_name: string | null;
  locationDbId: string | null;
  location_id: string | null;
  locationName: string | null;
  location_name: string | null;
  programDbId: string | null;
  program_id: string | null;
  programName: string | null;
  program_name: string | null;
  trialDbId: string | null;
  trial_id: string | null;
  trialName: string | null;
  trial_name: string | null;
  contacts?: StudyContactRow[];
  seasons?: string[];
  studyContacts?: StudyContactRow[];
  studySeasons?: StudySeasonRow[];
}
