export declare interface MetaData {
  key: string
  value:
    | null
    | string
    | Array<PickupPoint>
    | LeadTime
    | boolean
    | EnvironmentalData
}

export declare interface PickupPoint {
  id: string
  displayName: string
  distance: string
  open247: boolean
  leadTime: PickupPointLeadTime
  address: string
  openingHours: string
  lockerDescription: string
}

export declare interface EnvironmentalData {
  fossilFree: boolean
  tagUrl?: string
}

export declare interface PickupPointLeadTime {
  description: string
  deliveryDate: string
  deliveryWindow: LeadTimeWindow
}

export declare interface LeadTime {
  description: string
  deliveryDate: string | null
  deliveryWindows: Array<LeadTimeWindow>
  deliveryDateAlternatives: Array<DeliveryDateAlternative>
}

export declare interface DeliveryDateAlternative {
  description: string
  deliveryDate: string
  deliveryDateFormatted: string
  timeSlots: Array<LeadTimeWindow>
  shippingDate: string
}

export declare interface LeadTimeWindow {
  from: string | null
  to: string | null
}

export enum PostenBringShippingOptions {
  MAILBOX = 'posten-bring-checkout-mailbox',
  PIKCUP_POINT = 'posten-bring-checkout-pickup-point',
  HOME_DELIVERY = 'posten-bring-checkout-home-delivery',
  PARCEL_LOCKER = 'posten-bring-checkout-parcel-locker',
  PARCEL_TO_BUSINESS = 'posten-bring-checkout-parcel-to-business',
  GROUPAGE = 'posten-bring-checkout-groupage',
  PALLET = 'posten-bring-checkout-pallet',
}
