import { buildBookingEditDrawerState } from "../bookingEditService/buildBookingEditDrawerState";
import { resolveBookingEditCustomerId } from "../bookingEditService/buildBookingEditDrawerState";

/**
 * 加车 / 跨日报价展开所需的 booking state（不依赖 miniRedux）。
 */
export function buildBookingStateForAddFlow(input) {
  var _input$resourcesOrigi;
  var customerId = resolveBookingEditCustomerId(input.tempOrder, input.customerId);
  return buildBookingEditDrawerState({
    cacheItem: input.cacheItem,
    bookingConfig: input.bookingConfig,
    date: input.date,
    customerId: customerId,
    locale: input.locale,
    resourcesOrigin: (_input$resourcesOrigi = input.resourcesOrigin) !== null && _input$resourcesOrigi !== void 0 ? _input$resourcesOrigi : []
  });
}