1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2966],{2966:function(e,t,o){o.r(t);var s=o(5893),l=o(7294),c=o(3935),i=o(8665),a=o(8351);let n={isOpen:!1,useDefaultStructure:!0,closeOnOutsideClick:!1,titleText:"",closeText:"",theme:"",logout:!1,closeIconColor:"",noMaxWidth:!1,className:"",doesFromSupplierStock:!1},r=e=>{let t=document.getElementById("stock-alert"),[o,r]=l.useState(n),u=()=>{document.body.classList.remove("stock-alert-open")},d=()=>{e.setIsOpen(!1),r({...o,isOpen:!1})};return(l.useEffect(()=>(e.isOpen&&(document.body.classList.add("stock-alert-open"),r({isOpen:e.isOpen,useDefaultStructure:void 0!==e.useDefaultStructure?e.useDefaultStructure:n.useDefaultStructure,closeOnOutsideClick:void 0!==e.closeOnOutsideClick?e.closeOnOutsideClick:n.closeOnOutsideClick,titleText:e.titleText||n.titleText,closeText:e.closeText||n.closeText,theme:e.theme||n.theme,logout:e.logout||n.logout,closeIconColor:e.closeIconColor||n.closeIconColor,noMaxWidth:e.noMaxWidth||n.noMaxWidth,className:e.className||n.className,doesFromSupplierStock:e.doesFromSupplierStock})),()=>{u()}),[e.isOpen,e.doesFromSupplierStock]),l.useEffect(()=>{r(t=>({...t,titleText:e.titleText||n.titleText}))},[e.titleText]),t)?c.createPortal((0,s.jsx)(i.Z,{in:o.isOpen,timeout:300,classNames:"standalone-fade",mountOnEnter:!0,unmountOnExit:!0,onExited:u,children:(0,s.jsxs)("section",{className:"component-stock-alert",tabIndex:-1,role:"dialog","aria-labelledby":"title",onClick:()=>{o.closeOnOutsideClick&&d()},children:[(0,s.jsxs)("div",{className:"content",role:"document",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h2",{className:"h5 medium text-warning",children:"Local Stock Exceeded:"}),(0,s.jsx)("p",{className:"form-error",children:"This product is unavailable from your local warehouse, you can still add it to your cart and have it delivered from our national warehouse and additional shipping costs will apply."}),o.doesFromSupplierStock&&(0,s.jsx)("p",{className:"form-error",children:"The ETA is 2 to 5 days."})]}),(0,s.jsx)("div",{onClick:()=>d(),className:"close",children:(0,s.jsx)(a.Z,{path:"/static/svg/close-icon.svg",width:24,height:24})})]})}),t):null};t.default=r}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.