"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[36],{247:(e,t,r)=>{const d=r(248);(0,r(1).createEntrypoint)("alby_section",d.Alby)},248:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Alby=function(e){const{product:t,selectedVariant:r}=(0,i.useBentoShared)((e=>({product:e.product,selectedVariant:e.selectedVariant}))),f=null==t?void 0:t.id,p=null==r?void 0:r.variantId,v=(0,n.useRef)(null);(0,n.useEffect)((()=>{v.current&&(0,c.waitForX)((()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.switchProduct})).then((e=>{var t,r;return null===(r=null===(t=v.current)||void 0===t?void 0:t.switchProduct)||void 0===r?void 0:r.call(t,s(f),o(p))}))}),[f,p]);const b=l(e)?{"product-ids":e.productGids.join(","),category:e.category}:{"product-id":s(f)},g=Object.assign(Object.assign({},b),{"widget-id":l(e)?"3d1d77fb-638d-470e-a2d1-68857d7b166f":"343024bd-f0d8-440f-ac87-7f7a1364cd80"});return(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:"alby-generative-qa { margin: var(--section-padding); }"}}),(0,d.jsx)(u,Object.assign({ref:v},g))]})};const d=r(0),n=r(2),i=r(4),c=r(58),a=r(0),s=e=>e?`gid://shopify/Product/${e}`:"",o=e=>e?`gid://shopify/ProductVariant/${e}`:"",u="alby-generative-qa",l=e=>"productGids"in e}},e=>{e.O(0,[1,2,3,4,6,5,25],(()=>e(e.s=247))),e.O()}]);