1import{r as d,j as a}from"./@react-core-DAiQxeIm.js";import{m as b,j as y}from"./WrapperLayout-DW7P2zvO.js";import{P as v,a as g}from"./ProductAddToCartButton-IobofDOw.js";import{q as u}from"./app-Cyh6yV_e.js";import"./fetch-DIMp6ACm.js";import"./useModal-DijYsnd1.js";import"./MetricsEvents-ePHyF7G_.js";import"./FormatPrice-DHQ3sYHY.js";import"./useThemeVisuals-B1RdzApi.js";import"./MainLayout-BG0Ff-G8.js";import"./renderComponents-PVdm_eq0.js";import"./useIsOnlineLightingShop-CZ-toRlz.js";const h=({initStateVisible:c,actionIsVisible:s,actionIsNotVisible:o,referenceDomElement:t,marginTop:i=0})=>{const[r,e]=d.useState(c),p=parseInt(b())||0;return d.useEffect(()=>{const l=x=>{x[0].isIntersecting?(e(!0),s&&s()):(e(!1),o&&o())},m=i-p,n=new IntersectionObserver(l,{rootMargin:`${m}px 0px 0px 0px`});return t.current&&(n==null||n.observe(t==null?void 0:t.current)),()=>{n&&n.disconnect()}},[]),{isVisible:r}},f=({referenceDomElement:c,children:s,classContainer:o=""})=>{const t=u("#oct8ne-button");let i=u("#livechat-wrapper");const r=t&&t.style.display!=="none",e=()=>{r&&t.classList.add("is-active"),i&&i.classList.add("is-active")},p=()=>{r&&t.classList.remove("is-active"),i&&i.classList.remove("is-active"),i||(i=u("#livechat-wrapper"))},{isVisible:l}=h({referenceDomElement:c,actionIsVisible:p,actionIsNotVisible:e,initStateVisible:!0});return a.jsx(a.Fragment,{children:a.jsx("div",{className:`fixed right-0 w-full z-30 pt-2 pb-7 px-3 bg-white shadow-[0px_22px_40px_4px_rgba(0,0,0,0.70)] ${l?"duration-[2s] -bottom-full opacity-0":"bottom-0 opacity-100 duration-500"} ${o} cy-revealed-add-to-cart`,children:s})})},M=({quantity:c,totalPrice:s,addToCartRef:o,dataToAddToCart:t,metricsObjectParams:i,actionSuccess:r,minimalQuantity:e})=>a.jsx(f,{referenceDomElement:o,children:t?a.jsx(v,{dataToAddToCart:t,totalPrice:s,metricsObjectParams:i,actionSuccess:r,minimalQuantity:e}):a.jsx(g,{actionOnClick:()=>{y("addToCartMobile",0)},totalPrice:s,quantity:c})});export{M as ProductStickyBar};
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.