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{bc as g,a as e,E as r,bd as y,be as b,b as f,d as u,bf as p,i as h,bg as _,I as S,B as d,aK as T,bh as E,bi as I,bj as M}from"./app.ZXowmuNl.js";import{M as P}from"./StackedMerchandisePreview.aoM-w7_c.js";function q({deliveryMethod:n,subtitle:t,isInModal:i=!1,choiceListContext:s=!0,useBaseFontSize:a}){const{deliveryExpectationLines:l}=g(),c=l?.find(m=>m.deliveryStrategyHandle===n.handle),o=i||a?void 0:"small";return t?e(r,{size:o,color:"subdued",children:t}):e(y,{deliveryMethod:n,deliveryExpectationLine:c,size:o,choiceListContext:s&&!i})}function x({merchandiseItem:{title:n,quantity:t},titleTypographyStyle:i,quantityPosition:s}){const a=h();return s==="inline"?e(r,{style:i,children:a("shipping.split_shipping_merchandise_quantity_label_inline",{merchandise_title:n,quantity:t??0},"%{merchandise_title} ×%{quantity}")}):e(r,{style:i,children:n})}function L({merchandiseItem:{subtitle:n,quantity:t},textDefaultProps:i,quantityPosition:s}){const a=h(),l=s==="inlinePrimary";return n||l?e(S,{blockAlignment:"center",spacing:"small400",children:[n?e(r,{...i,children:n}):null,n&&l?e(r,{...i,children:_}):null,l?e(r,{...i,children:a("shipping.split_shipping_merchandise_quantity_label_inline_primary",{quantity:t??0},"Quantity: %{quantity}")}):null]}):null}function k({merchandiseItem:n,thumbnailSize:t}){const{lineItems:{quantityPosition:i="thumbnailBadge",titleTypographyStyle:s,optionsTypographyStyle:a,optionsAppearance:l="subdued",optionsEmphasis:c}}=f();return e(p,{columns:["auto","fill"],spacing:"small200",children:[e(P,{merchandiseItem:n,size:t}),e(u,{blockAlignment:"center",children:[e(x,{merchandiseItem:n,titleTypographyStyle:s,quantityPosition:i}),e(L,{merchandiseItem:n,textDefaultProps:{size:"small",color:l,type:c==="bold"?"strong":void 0,style:a},quantityPosition:i})]})]})}function v({merchandise:n,thumbnailSize:t="small",merchandiseItemSpacing:i="small200",merchandiseItemPadding:s="none"}){return e(b,{spacing:i,rows:"auto",padding:s,children:n.map(a=>e(k,{merchandiseItem:a,thumbnailSize:t},a.stableId))})}function z({merchandiseLines:n=[],deliveryMethod:t,modalHeader:i,subtitle:s,choiceListContext:a=!0,shouldRightAlignPrice:l,open:c=!1}){return e(M,{padding:!0,title:i,size:"auto",accessibilityLabel:i,id:"merchandise-modal",open:c,children:[e(v,{merchandise:n,thumbnailSize:"base",merchandiseItemSpacing:"base",merchandiseItemPadding:["small100","none","none","none"]}),e(d,{spacing:"large200"}),e(T,{}),e(d,{}),e(p,{columns:["fill","auto"],children:[e(u,{blockAlignment:"start",children:[e(r,{children:E({deliveryMethod:t})}),e(q,{subtitle:s,deliveryMethod:t,choiceListContext:a,isInModal:!0})]}),l?e(I,{cost:t.cost,costAfterDiscounts:t.costAfterDiscounts,styleOverrides:{shouldBold:!a,freeTextLetterCase:"uppercase",costSpacing:"none"}}):null]}),e(d,{spacing:"large200"})]})}export{v as E,z as M,q as S};