var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}var window = _____WB$wombat$assign$function_____("window");
var self = _____WB$wombat$assign$function_____("self");
var document = _____WB$wombat$assign$function_____("document");
var location = _____WB$wombat$assign$function_____("location");
var top = _____WB$wombat$assign$function_____("top");
var parent = _____WB$wombat$assign$function_____("parent");
var frames = _____WB$wombat$assign$function_____("frames");
var opener = _____WB$wombat$assign$function_____("opener");
import{a as e,I as r,E as c,D as o,J as m,i as p,K as d,N as u,Q as g,B as k,U as _,X as y,G as b}from"./app.ZXowmuNl.js";import{M as w}from"./MerchandiseModal.BPtcnyj2.js";import{S as B,M as S}from"./StackedMerchandisePreview.aoM-w7_c.js";function v({quantityTitle:n,open:t,onPress:i}){return e(m,{expanded:t,onPress:i,children:e(r,{blockAlignment:"center",spacing:"small400",children:[e(c,{tone:"accent",children:n}),e(o,{size:"small-200",appearance:"interactive",type:t?"chevron-up":"chevron-down"})]})})}function f({targetMerchandiseLines:n,selectedDeliveryMethod:t,merchandiseQuantityText:i,modalHeader:a}){return e(m,{overlay:e(w,{merchandiseLines:n,deliveryMethod:t,modalHeader:a,shouldRightAlignPrice:!0}),children:e(r,{blockAlignment:"center",children:[n.length>1?e(B,{merchandiseItem:n[0],merchandiseLinesLength:n.length}):e(S,{merchandiseItem:n[0],hideBadge:!0}),e(r,{spacing:"small500",blockAlignment:"center",children:[e(o,{appearance:"accent",type:"truck",size:"small"}),e(c,{tone:"accent",size:"small",children:i})]})]})})}function I(){const n=p(),[t,i]=d(!1),{selectedDeliveryMethod:a}=u();if(!a)return null;const l=a.priceBreakdown??[];return e(b,{children:[e(c,{color:"subdued",children:e(r,{blockAlignment:"center",spacing:"small500",children:[e(o,{type:"truck"}),n("shipping.split_shipping_shipment_notice",{quantity_shipments:e(v,{quantityTitle:n("shipping.split_shipping_multiple_shipment_quantity_label",{quantity:l.length},"%{quantity} shipments"),open:t,onPress:()=>i(s=>!s)})},"Your order will arrive in %{quantity_shipments}")]})}),e(g,{open:t,id:"shipmentBreakdown",children:[e(k,{spacing:"small100"}),e(_,{spacing:"small100",children:l.map(({targetMerchandiseLines:s},h)=>e(f,{targetMerchandiseLines:s,selectedDeliveryMethod:a,merchandiseQuantityText:n("order_summary.discount_discovery.merchandise_quantity_label",{count:y(s)},{one:"%{count} item",other:"%{count} items"}),modalHeader:n("shipping.split_shipping_merchandise_shipment_number",{number:h+1,total:l.length},"Shipment %{number} of %{total}")},h))})]})]})}export{I as S};