import type { CargoType } from "@/lib/frontend/types";
import type { ApiDimUnit, ApiWeightUnit } from "@/modules/quote/unit-converter";
import type { MothershipAddressCandidate } from "@/modules/address/types";

export type HostPublicCargoInput = {
  weight: { value: number; unit: ApiWeightUnit };
  dimensions: {
    length: number;
    width: number;
    height: number;
    unit: ApiDimUnit;
  };
  pallet_count: number;
  cargo_type: CargoType;
};

export type HostPublicAddressDraft = {
  street: string;
  city: string;
  state: string;
  zip?: string;
};

export type HostPublicSessionPayload = {
  customer_id: string;
  cargo: HostPublicCargoInput;
  pickup_draft: HostPublicAddressDraft;
  delivery_draft: HostPublicAddressDraft;
  quote_session_id?: string;
  pickup_candidates: MothershipAddressCandidate[];
  delivery_candidates: MothershipAddressCandidate[];
  created_at: string;
};

export type HostPublicCandidatesResponse = {
  host_session_id: string;
  pickup_candidates: MothershipAddressCandidate[];
  delivery_candidates: MothershipAddressCandidate[];
  requires_selection: boolean;
};
