export type DailyEconomics = {
  day: string
  interval_count: number
  import_kwh: number
  export_kwh: number
  pv_kwh: number
  load_kwh: number
  pv_self_consumption_kwh: number
  ev_kwh: number
  hp_kwh: number
  import_cost_czk: number
  export_revenue_czk: number
  grid_import_cashflow_czk: number
  grid_export_revenue_czk: number
  net_cost_czk: number
  green_bonus_czk: number
  total_balance_czk: number
  planned_balance_czk: number | null
  deviation_cost_czk: number | null
  is_locked: boolean
}

export type DailyEconomicsResponse = {
  days: DailyEconomics[]
  has_green_bonus: boolean
}

export type IntervalEconomics = {
  interval_start: string
  import_kwh: number
  export_kwh: number
  dynamic_cost_czk: number | null
  grid_import_cashflow_czk: number | null
  grid_export_revenue_czk: number | null
  stored_cost_czk: number | null
  green_bonus_czk: number | null
  planned_cost_czk: number | null
  planned_grid_w: number | null
  actual_grid_power_w: number | null
  effective_buy_price: number | null
  effective_sell_price: number | null
  planned_buy_price: number | null
  planned_sell_price: number | null
  actual_pv_power_w: number | null
  actual_load_power_w: number | null
  actual_battery_power_w: number | null
  actual_battery_soc_pct: number | null
}

export type ChartDayPoint = {
  day: string
  daily_balance_czk: number
  daily_grid_balance_czk: number
  daily_green_bonus_czk: number
  daily_import_cost_czk: number
  daily_export_revenue_czk: number
  cumulative_balance_czk: number
  cumulative_grid_balance_czk: number
}

export type LockResponse = {
  locked: boolean
  day: string
}
