const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/subService-CVkcMGTG.js","assets/index-5EzIKamN.js","assets/index-DZdJNYK8.css","assets/progressbar-BINylhix.js","assets/index-Bh2-GbaX.js","assets/counter-CIZzcNzl.js","assets/fixation-B-YIQ0ms.js","assets/getintouch-C72VConf.js"])))=>i.map(i=>d[i]);
import{r as e,_ as u,s as d,q as _,j as o,L as S}from"./index-5EzIKamN.js";import{s as m}from"./data-BSGeAOBW.js";const x=e.lazy(()=>u(()=>import("./subService-CVkcMGTG.js"),__vite__mapDeps([0,1,2,3]))),E=e.lazy(()=>u(()=>import("./index-Bh2-GbaX.js"),__vite__mapDeps([4,1,2,5,6,7]))),y=()=>{const{serviceUrl:a}=d(),[s,c]=e.useState(null),[v,l]=e.useState(null),[f,n]=e.useState(!0);if(e.useEffect(()=>{let t=!0;window.scrollTo({top:0}),c(null),l(null),n(!0);const r=m.find(i=>i.serviceUrl===a);return t&&c(r),(r==null?void 0:r.type)==="subService"?_.get(`https://api.wishgeeks.com/service/${a}`).then(i=>{t&&l(i.data.Service)}).catch(i=>{}).finally(()=>{t&&n(!1)}):n(!1),()=>{t=!1}},[a]),!s)return o.jsx("p",{children:"Service not found"});const p=s.type==="service"?E:x;return o.jsx(e.Suspense,{fallback:o.jsx(S,{}),children:o.jsx(p,{service:s.type==="service"?s:v,isPriceLoading:f})})};export{y as default};