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