PozoAppOptimandSEO/dist1 (2)/assets/SolutionsList-e4ceaac8.js

2 lines
2.3 KiB
JavaScript

import{u as e,a as i,j as s}from"./index-35672308.js";import{r as n}from"./vendor-c65bce76.js";import"./ui-2d515953.js";import"./utils-faf49605.js";import"./editor-e98c3426.js";const t="/home/",l=({solutionsRef:l,closingSolutions:o})=>{const a=e(),c=i(),[r,d]=n.useState({top:"4rem",left:"40%"}),u=n.useCallback((()=>{const e=document.querySelector('[data-solutions-link="true"]');if(e){const i=e.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop;d({top:`${i.bottom+s+4}px`,left:`${i.left}px`})}}),[]);return n.useEffect((()=>{if(o)return;const e=setTimeout(u,10);let i=!1;const s=()=>{i||(window.requestAnimationFrame((()=>{u(),i=!1})),i=!0)};return window.addEventListener("resize",s,{passive:!0}),window.addEventListener("scroll",s,{passive:!0,capture:!0}),()=>{clearTimeout(e),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}}),[u,o]),s.jsx("div",{ref:l,className:"solutions-dropdown "+(o?"closing":""),onWheel:e=>e.stopPropagation(),style:{position:"fixed",top:r.top,left:r.left},children:s.jsxs("div",{className:"solutions-list",children:[s.jsx("div",{className:"solution-item "+(c.pathname.includes("retail-billing")?"active":""),onClick:()=>a(`${t}solutions/retail-billing`),children:s.jsx("span",{children:"Retail Billing"})}),s.jsx("div",{className:"solution-item "+(c.pathname.includes("inventory-purchase")?"active":""),onClick:()=>a(`${t}solutions/inventory-purchase`),children:s.jsx("span",{children:"Inventory & Purchase"})}),s.jsx("div",{className:"solution-item "+(c.pathname.includes("weighing-scale-pos")?"active":""),onClick:()=>a(`${t}solutions/weighing-scale-pos`),children:s.jsx("span",{children:"Weighing Scale POS"})}),s.jsx("div",{className:"solution-item "+(c.pathname.includes("multi-store-erp")?"active":""),onClick:()=>a(`${t}solutions/multi-store-erp`),children:s.jsx("span",{children:"Multi-Store ERP"})}),s.jsx("div",{className:"solution-item "+(c.pathname.includes("gst-billing-e-invoice")?"active":""),onClick:()=>a(`${t}solutions/gst-billing-e-invoice`),children:s.jsx("span",{children:"GST Billing & E-Invoice"})}),s.jsx("div",{className:"solution-item "+(c.pathname.includes("offline-billing")?"active":""),onClick:()=>a(`${t}solutions/offline-billing`),children:s.jsx("span",{children:"Offline Billing"})})]})})};export{l as default};