"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[20],{117:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});const a={container:"ysCzUg0A",box:"sv8FM_io",image:"R7F2ygoj",title:"n5nix3OP",optionWrapper:"XizENmND",sectionTitle:"omXHtLBB",completeTheLookContainer:"XvceVwIx",completeTheLookCardsWrapper:"qvNyIJ2f",buyBox:"OT2U82vz",messagePill:"CpQF9DwH"}},11:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});const a={container:"O9IcGWrR",sizeGuideContainer:"Sjgd8MXw",sizeGuideLabel:"maXcOloV",sizeGuideCheckbox:"bjWJCfH8",modalOverlay:"o3JfeQ8Y",modal:"rDogYdZh",modalImage:"UWyRdhCC",modalBackground:"nsap7aGo",closeBtn:"LeKie3P2",colorOption:"BSnU3jak",colorOptionSmall:"ueI1yDi4",colorOptionSelected:"QMl69tAx",sizeOption:"MSGuc0os",sizeOptionSmall:"_LAImWda",soldOut:"z_5wn5b_",sizeOptionSelected:"UXdMckXt",label:"EIfulk0V",smallOptionLabel:"UixcHeUq",optionContainer:"SJQFNexH",small:"vzwk4W6S",visuallyHidden:"zkx8p4KR",divider:"pWq23Myu",resetLinkStyles:"N1cHTXJ7",dropdown:"TkYtS_aR"}},27:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});const a={container:"lJdQwzYh",small:"FZXIRNTB",productPriceDefault:"R2JvcJin",productPrice:"pVzkKcC7",compareAtPrice:"f7Y7WbCg",login:"IBT6ZD4a",memberLink:"NgDvddjN",pricePill:"hVEOmGAB"}},71:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});const a={container:"kCnYDLzR",small:"m_LXTn8P",addButton:"YUeVwYml",linethrough:"TekpRu6F",backinstockContainer:"FbAiPRNO",bsTitle:"a3V4YjS8",bsProductTitle:"bmYUJgr_",bsText:"DaMJ43Zi",divider:"dLTgkIzV",phoneInput:"FcAxBeHQ",submitted:"ufaFAZ4c",notifyAvailableCheckbox:"KvvNSbB6",modalOverlay:"m2eqLb6A",modal:"HW1ddjw1",modalBackground:"JlvpZ9MA",closeBtn:"wlV5b2eI"}},116:(e,t,o)=>{const a=o(46);(0,o(2).createEntrypoint)("product_hero_complete_the_look",a.CompleteTheLook)},5:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatPrice=t.DEFAULT_BUNDLE_IMAGE=t.SHOPIFY_FILE_PATH=t.VALID_STORE_OPTIONS=t.EXCLUDE_TAGS=t.REVIEWS_ENDPOINT=t.REVIEWS_PER_PAGE=t.PRODUCT_IMAGE_WIDTH=t.PRODUCT_IMAGE_HEIGHT=t.PROJECT_HOSTNAME=void 0,t.PROJECT_HOSTNAME="comfrt.com",t.PRODUCT_IMAGE_HEIGHT=1600,t.PRODUCT_IMAGE_WIDTH=1200,t.REVIEWS_PER_PAGE=28,t.REVIEWS_ENDPOINT="https://shalom-development-worker-may-2024.digitaloptgroup.workers.dev",t.EXCLUDE_TAGS=["add","Extra Comfy"],t.VALID_STORE_OPTIONS=["Size","Color"],t.SHOPIFY_FILE_PATH="https://cdn.shopify.com/s/files/1/0569/4029/8284",t.DEFAULT_BUNDLE_IMAGE="https://cdn.shopify.com/s/files/1/0569/4029/8284/files/D_1_08856425-31e4-48ba-a71f-d8c06ce730ad.png?v=1655843751",t.formatPrice=function(e){return parseInt(e)}},46:function(e,t,o){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteTheLook=void 0;const i=o(0),n=o(1),r=o(3),s=a(o(117)),d=o(25),l=o(4),c=o(13),u=o(15),p=o(5);function m({product:e,findProductVariantWithOption:t,getHexForOptionColor:o,pathname:a,addToCart:l,cartStatus:m,device:O,fullWidth:f}){var g,v,T;const[_,C]=(0,r.useState)(e.variants[0]),I=null===(g=null==_?void 0:_.image)||void 0===g?void 0:g.src;if(!I)return(0,i.jsx)(n.Fragment,{});const E=e.options.find((e=>"Color"===e.name)),P=e.options.find((e=>"Size"===e.name)),x=null===(T=null===(v=null==_?void 0:_.metafields)||void 0===v?void 0:v.find((e=>"limited_stock"===(null==e?void 0:e.key))))||void 0===T?void 0:T.value,j=(0,r.useMemo)((()=>{const t=new URL(`https://${p.PROJECT_HOSTNAME}`);return t.pathname=`/products/${e.handle}`,t.searchParams.set("variant",_.variantId),t.toString()}),[_.variantId]);return(0,i.jsxs)(n.Fragment,{children:[f&&(0,i.jsx)("div",Object.assign({class:s.default.container},{children:(0,i.jsx)(h,{src:I,preorder:x,productUrl:j})})),(0,i.jsxs)("div",Object.assign({class:s.default.container},{children:[!f&&(0,i.jsx)(h,{src:I,preorder:x,productUrl:j}),(0,i.jsxs)("div",Object.assign({class:s.default.buyBox},{children:[(0,i.jsx)("a",Object.assign({href:j,class:s.default.title},{children:e.title})),(0,i.jsxs)("div",Object.assign({class:s.default.optionWrapper},{children:[(0,i.jsx)(u.ProductPrice,{selectedVariant:_,small:!0}),E&&(0,i.jsx)(c.ProductOption,{small:!0,option:E,getHexForOptionColor:o,selectedVariant:_,findProductVariantWithOption:o=>t(o,e,_),pathname:a,setSelectedVariantId:t=>{const o=e.variants.find((e=>e.variantId===t));o&&C(o)}}),P&&(0,i.jsx)(c.ProductOption,{renderDropdown:"desktop"!==O,small:!0,option:P,getHexForOptionColor:o,selectedVariant:_,findProductVariantWithOption:o=>t(o,e,_),pathname:a,setSelectedVariantId:t=>{const o=e.variants.find((e=>e.variantId===t));o&&C(o)}}),(0,i.jsx)(d.AddToCartButton,{selectedVariant:_,getHexForOptionColor:o,pathname:a,addToCart:l,cartStatus:m,size:"small"})]}))]}))]}))]})}function h({src:e,preorder:t,productUrl:o}){return(0,i.jsxs)("a",Object.assign({class:s.default.box,href:o},{children:[(0,i.jsx)(l.LazyImage,{src:e,initialWidth:350,fullSizeWidth:350,width:350,height:467,cssClass:s.default.image}),t&&(0,i.jsx)("div",Object.assign({class:s.default.messagePill},{children:t}))]}))}t.CompleteTheLook=function({useSharedState:e,completeTheLook:t,device:o}){const a=e(),{selectedVariant:r,getHexForOptionColor:d,pathname:l,addToCart:c,cartStatus:u,findProductVariantWithOption:p}=a((e=>({product:e.product,findProductVariantWithOption:e.findProductVariantWithOption,selectedVariant:e.selectedVariant,addToCart:e.addToCart,getHexForOptionColor:e.getHexForOptionColor,pathname:e.pathname,cartStatus:e.cartStatus}))),h=null==r?void 0:r.selectedOptions.find((e=>"Color"===e.name));return h?(0,i.jsxs)("div",Object.assign({class:s.default.completeTheLookContainer},{children:[(0,i.jsx)("div",Object.assign({class:s.default.sectionTitle},{children:"Complete The Look"})),(0,i.jsx)("div",Object.assign({class:s.default.completeTheLookCardsWrapper},{children:t.map((e=>(0,i.jsx)(m,{fullWidth:1===t.length,product:e,findProductVariantWithOption:p,getHexForOptionColor:d,colorOption:h,pathname:l,addToCart:c,cartStatus:u,device:o})))}))]})):(0,i.jsx)(n.Fragment,{})}},4:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LazyImage=void 0;const a=o(0),i=(o(1),o(7)),n=o(3);t.LazyImage=function({src:e,initialWidth:t,fullSizeWidth:o,cssClass:r,alt:s="",width:d,height:l}){const c=(0,i.getFastImage)(e,t),u=(0,i.getFastImage)(e,o),[p,m]=(0,n.useState)({}),h=(0,n.useMemo)((()=>p[u]?u:c),[e,t,o,p]);return(0,n.useEffect)((()=>{if(document){const e=document.createElement("img");e.src=u,e.onload=()=>m(Object.assign(Object.assign({},p),{[u]:!0}))}}),[u]),d&&l?(0,a.jsx)("img",{src:h,class:r,alt:s,width:d,height:l}):(0,a.jsx)("img",{src:h,class:r,alt:s})}}},e=>{e.O(0,[1,2,3,4,5,6,7,8,9,10,12],(()=>(116,e(e.s=116)))),e.O()}]);