// Request
export interface StatisticsFormRequest {
  startDate: string | null;
  endDate: string | null;
  state: string | null;
  country: string | null;
}

// Response
export interface DataFormResponse {
  filters: StatisticsFormRequest;
  production: ProductionResponse;
  licenses: LicensesResponse;
  macroIndicators: MacroIndicatorsResponse;
  mesoIndicators: MesoIndicatorsResponse;
}

export interface ProductionResponse {
  avgMilkLitersPerDayProperty: string | null;
  avgLactatingCows: string | null;
  avgIDH: string | null;
  totalProperties: number;
}

export interface LicensesResponse {
  environmentalLicense: LicensesDetails;
  waterGrant: LicensesDetails;
}

export interface LicensesDetails {
  dispensa: LicensesIndicator;
  nao: LicensesIndicator;
  sim: LicensesIndicator;
}

export interface LicensesIndicator {
  count: number;
  percentage: number;
}

export interface MacroIndicatorsResponse {
  waterManagement: MacroIndicatorsDetails;
  waterQualityConservation: MacroIndicatorsDetails;
  wasteManagement: MacroIndicatorsDetails;
  waterPerformanceIndex: MacroIndicatorsDetails;
}

export interface MacroIndicatorsDetails {
  avg: string | null;
  indicatorCount: number;
}

export interface MesoIndicatorsResponse {
  waterManagement: WaterManagementMesoDetails;
  waterQualityConservation: WaterQualityConservationMesoDetails;
  wasteManagement: WasteManagementMesoDetails;
}

export interface WaterManagementMesoDetails {
  consumoAgua: string | null;
  perdasAgua: string | null;
  segurancaHidrica: string | null;
}

export interface WaterQualityConservationMesoDetails {
  qualidadeAgua: string | null;
  conservacaoAgua: string | null;
}

export interface WasteManagementMesoDetails {
  estrutura: string | null;
  manejoResiduo: string | null;
  adubacao: string | null;
}
