export interface VehicleColor {
  title: string
  code: string
}

export interface VehicleLocation {
  id: number
  name: string
  address: string
  is_delivery_enabled: boolean
}

export interface VehicleOption {
  id: string
  name: string
  icon: string
}

export interface VehiclePriceTariff {
  day: string
}

export interface VehicleLinks {
  self: {
    href: string
  }
}

export interface Vehicle {
  id: string
  year: number
  number_seats: number
  number_doors: number
  large_bags: number
  small_bags: number
  odometer: string
  brand: string
  mark: string
  group: string
  color: VehicleColor
  type: string
  body_type: string
  min_price: number
  price: number
  price_tariff: VehiclePriceTariff
  status: string
  currency: string
  consumption: string | null
  fuel: string
  volume_tank: number | null
  volume_engine: number
  transmission: string
  locations: VehicleLocation[]
  options: VehicleOption[]
  thumbnail: string
  thumbnails: string[]
  photos: string[]
  custom_fields: any[]
  _links: VehicleLinks
  wheel_drive: string
  registration_number: string
  seasons: any[]
  periods_price: any[]
  insurance_deposit: number
}

export type VehicleListResponse = Vehicle[]

export interface VehicleSingleResponse {
  data: Vehicle
}

export interface VehicleApiError {
  error: string
  message: string
  status: number
}

export type VehicleApiResponse = VehicleListResponse | VehicleSingleResponse | VehicleApiError
