(self.webpackChunkui=self.webpackChunkui||[]).push([[94],{287:(t,e,n)=>{"use strict";var o=n(0);function i({threshold:t,message:e,warningIcon:n,apps:{product:i}}){var r;const s=i.selectedVariant.value,a=null!==(r=null==s?void 0:s.quantityAvailable)&&void 0!==r?r:0;if(a>t||a<=0||(null==s?void 0:s.oos))return(0,o.jsx)(o.Fragment,{});const l=e.replace("__COUNT__",a.toString());return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{class:"dwEKzs4Z __bite_extend __bite_theme_lowStockMessage",role:"status","aria-live":"polite",children:(0,o.jsxs)("span",{class:"g6sNkR5T",children:[n&&(0,o.jsx)("img",{src:n.url,width:n.width,height:n.height,alt:n.altText}),l]})})})}var r=n(2),s=n(6),a=n(13),l=n(24);const c=[a.a];r.BentoUI.feature({featureId:"product_low_stock",variations:[r.BentoUI.variation({component:i,variationId:"default",hydrate:!0,apps:c,render(t){return e=this,n=arguments,i=function*({globalState:t,context:e}){var n,o;const{props:i}=yield t,r=yield(0,l.a)(i.byteState),a=null==r?void 0:r.product;if(!a||(null==a?void 0:a.packCollections)||a.isPack)return{html:""};const c="desktop"===e.device?null===(n=i.desktopHeroBlocks.right_column)||void 0===n?void 0:n.find((t=>"product_low_stock"===t.type)):null===(o=i.heroBlocks)||void 0===o?void 0:o.find((t=>"product_low_stock"===t.type));if(!c)return{html:""};if(!(null==a?void 0:a.id))return{html:""};const u=(0,s.a)(c.warning_icon);return{props:{threshold:c.stock_threshold,message:c.message,warningIcon:u}}},new((o=void 0)||(o=Promise))((function(t,r){function s(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,a)}l((i=i.apply(e,n||[])).next())}));var e,n,o,i}})]}),(0,r.createEntrypoint)("product_low_stock",i,c)},12:()=>{}},t=>{t.O(0,[1,2,3,4,5,6,7,8,9,10,11,12,14,13,17,16,15,18,19,20,21,24,23],(()=>t(t.s=287))),t.O()}]);