const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["ab63b84b.DCDK_lgf.js","630ba094.L_X-5TXi.js","6ec9a0fa.rdcQt2v8.js","f025431a.BlsbPO0-.js","4509beb0.BguNH--m.js","app.BAntcNCf.js","assets/app.CGRs8DQS.css","assets/deferred-boot.Drpcgh6C.css","68828c28.BNtUJcWB.js","f3089cd3.9kJkcqkU.js","53e8828a.X18bKQWI.js","assets/0fde071d7ex9f0ef4a6.B0RErzdh.css","4c5b1c9e.BI54QL2K.js","assets/605b2a80c9xbaeb52f9.BAjucZ-8.css","5bf177e7.B_wRNeOH.js","a541bc81.Cbl-i0FD.js","91e796b6.DVWctSLI.js","assets/6559bc5a39x1573b800.vTcdVGq4.css"])))=>i.map(i=>d[i]); import{Ft as e,Pt as i,ct as n,en as t,mt as a,nn as s,ot as r,pt as l,yt as o}from"./630ba094.L_X-5TXi.js";import{f as p}from"./app.BAntcNCf.js";import{AO as c,Bp as d,Gc as m,Gg as h,Oy as u,Pc as g,QA as v,Wb as _,ZA as y,_p as b,jO as f,kp as k,lk as x,r_ as D,vA as I,xO as S}from"./6ec9a0fa.rdcQt2v8.js";import{t as M}from"./8d7e1337.D1SAQfdV.js";import{r as T}from"./ee4d5c67.YGTDljOG.js";import{c as j}from"./f3089cd3.9kJkcqkU.js";import{a as L,s as z,t as A}from"./5bf177e7.B_wRNeOH.js";import{t as w}from"./a541bc81.Cbl-i0FD.js";var q=r({displayName:"SubscriptionGroupLine",load:()=>n(()=>p(()=>import("./ab63b84b.DCDK_lgf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))}),B={groupType:M("SUBSCRIPTION"),includeDeliverySelectionGroups:!1};function G({subscriptionLines:e,renderExtensionSlot:i}){const{i18n:n,shop:a}=S(),{customizationsBefore:s,customizationsAfter:r}=T({targeted:!0,hasMultipleDeliveryGroups:!0}).value,l=t(()=>a.marketDrivenShippingEnabled?j(e):e,[a.marketDrivenShippingEnabled,e]),p=l.length;return 0===p?null:o(f,{gridAutoRows:"minmax(auto, max-content)",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content)",gap:"small-200",children:[o(d,{level:3,children:n.translate("shipping.shipping_method_recurring_shipments_group_title.other")}),o(k,{customizations:s,options:B}),i?.("purchase.checkout.shipping-option-list.render-before",{options:B,targeted:!0,hasMultipleDeliveryGroups:!0}),o(h,{background:"subdued",padding:"base",borderRadius:"base",gap:"@media (inline-size >= extraSmall) small-100, small-200",children:l.map((e,n)=>o(q,{renderExtensionSlot:i,subscriptionLine:e,subscriptionLinesLength:p,index:n,showDivider:!1},e.id||D()))}),o(k,{customizations:r,options:B}),i?.("purchase.checkout.shipping-option-list.render-after",{options:B,targeted:!0,hasMultipleDeliveryGroups:!0})]})}var E=y("ShipmentBreakdownDetails");function O({targetMerchandiseLines:e,selectedDeliveryMethod:i,merchandiseQuantityText:n,modalHeader:t}){const a=v(void 0,E);return o(s,{children:[o(u,{commandFor:a,children:o(h,{direction:"inline",alignItems:"center",gap:"base",children:[e.length>1?o(g,{variant:"fan",merchandise:e,size:"small",useResponsiveImageSources:!0,useTitleAsAltTextFallback:!0}):o(w,{merchandiseItem:e[0],hideBadge:!0}),o(h,{direction:"inline",alignItems:"center",gap:"small-500",children:[o(x,{tone:"accent",type:"truck",size:"small"}),o(c,{tone:"accent",type:"small",children:n})]})]})}),o(A,{id:a,merchandiseLines:e,deliveryMethod:i,modalHeader:t})]})}function R({quantityTitle:e,open:i,onClick:n,controlId:t}){return o(u,{expanded:i,controlId:t,onClick:n,children:o(h,{direction:"inline",gap:"small-400",alignItems:"center",children:[o(c,{children:e}),o(x,{size:"small-200",type:i?"chevron-up":"chevron-down"})]})})}function C(){const{checkout:n,i18n:t}=S(),r=e(!1),p=z(),d=i(()=>L(p.value.selectedDeliveryMethod)),u=i(()=>d.value.length),g=i(()=>{if(!d.value?.length)return"";const e=t.translate("shipping.split_shipping_multiple_shipment_quantity_label",{quantity:d.value.length});return _({checkout:n})?t.translate("shipping.split_shipping_first_shipment_notice",{quantity_shipments:e}):t.translate("shipping.split_shipping_shipment_notice",{quantity_shipments:e})}),v=i(()=>p.value.selectedDeliveryMethod);return o(l,{when:v,children:e=>o(s,{children:[o(c,{color:"subdued",children:o(h,{direction:"inline",alignItems:"center",gap:"small-500",children:[o(x,{type:"truck"}),o(R,{quantityTitle:g.value,open:r.value,onClick:()=>r.value=!r.value,controlId:"shipmentBreakdown"})]})}),o(I,{open:r.value,id:"shipmentBreakdown",children:[o(b,{blockSize:"small-100"}),o(h,{gap:"small-100",children:o(a,{each:d,children:({targetMerchandiseLines:i},n)=>o(O,{targetMerchandiseLines:i,selectedDeliveryMethod:e,merchandiseQuantityText:t.translate("order_summary.discount_discovery.merchandise_quantity_label",{count:m(i)}),modalHeader:t.translate("shipping.split_shipping_merchandise_shipment_number",{number:n+1,total:u.value})})})})]})]})})}export{G as n,C as t};