1 line
6.3 KiB
JavaScript
1 line
6.3 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7505],{6654:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return r}});let l=s(12115);function r(e,t){let s=(0,l.useRef)(null),r=(0,l.useRef)(null);return(0,l.useCallback)(l=>{if(null===l){let e=s.current;e&&(s.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(s.current=n(e,l)),t&&(r.current=n(t,l))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},32941:(e,t,s)=>{"use strict";s.d(t,{mc:()=>a,wn:()=>n,xA:()=>i,zY:()=>r});var l=s(95155);function r(e){let{title:t,subtitle:s,actions:r}=e;return(0,l.jsx)("div",{className:"mb-8",children:(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-4xl font-display tracking-tight text-white mb-2",children:t}),s&&(0,l.jsx)("p",{className:"text-text-muted text-lg max-w-3xl",children:s})]}),r&&(0,l.jsx)("div",{className:"flex items-center gap-3",children:r})]})})}function n(e){let{children:t,className:s=""}=e;return(0,l.jsx)("section",{className:"section-spacing ".concat(s),children:t})}function a(e){let{children:t,className:s=""}=e;return(0,l.jsx)("div",{className:"container-custom ".concat(s),children:t})}function i(e){let{children:t,cols:s=3,gap:r="md",className:n=""}=e;return(0,l.jsx)("div",{className:"grid ".concat({1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[s]," ").concat({sm:"gap-4",md:"gap-6",lg:"gap-8"}[r]," ").concat(n),children:t})}s(12115)},66766:(e,t,s)=>{"use strict";s.d(t,{default:()=>r.a});var l=s(71469),r=s.n(l)},68389:(e,t,s)=>{Promise.resolve().then(s.bind(s,96592))},71469:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return c},getImageProps:function(){return i}});let l=s(88229),r=s(38883),n=s(33063),a=l._(s(51193));function i(e){let{props:t}=(0,r.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let c=n.Image},96592:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var l=s(95155),r=s(12115),n=s(32941),a=s(66766);function i(e){let{question:t,answer:s,id:n}=e,[a,i]=(0,r.useState)(!1);return(0,l.jsxs)("div",{className:"card",children:[(0,l.jsxs)("button",{className:"flex items-start justify-between w-full text-left",onClick:()=>i(!a),"aria-expanded":a,children:[(0,l.jsx)("h3",{className:"text-lg font-medium text-white pr-4",children:t}),(0,l.jsx)("svg",{className:"w-5 h-5 text-accent flex-shrink-0 transition-transform duration-300 ".concat(a?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(0,l.jsx)("div",{className:"overflow-hidden transition-all duration-300 ".concat(a?"max-h-96 mt-4":"max-h-0"),children:(0,l.jsx)("div",{className:"text-text-secondary leading-relaxed",dangerouslySetInnerHTML:{__html:s}})})]},n)}function c(){let[e,t]=(0,r.useState)([]),[s,c]=(0,r.useState)(!0),[o,d]=(0,r.useState)(null),[u,m]=(0,r.useState)("All");(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/faq");if(!e.ok)throw Error("Failed to fetch FAQs");let s=await e.json();t(s),c(!1)}catch(e){console.error("Error fetching FAQs:",e),d("Failed to load FAQs"),c(!1)}})()},[]);let x=[{category:"General",items:e.filter((e,t)=>t<2)},{category:"Services",items:e.filter((e,t)=>t>=2&&t<4)},{category:"Process",items:e.filter((e,t)=>t>=4)}],f="All"===u?x:x.filter(e=>e.category===u);return(0,l.jsx)("div",{className:"min-h-screen",children:(0,l.jsx)(n.wn,{className:"pt-32",children:(0,l.jsx)(n.mc,{children:(0,l.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,l.jsx)(n.zY,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about working with us"}),s&&(0,l.jsx)("div",{className:"text-center py-12",children:(0,l.jsx)("p",{className:"text-text-muted",children:"Loading FAQs..."})}),o&&(0,l.jsx)("div",{className:"text-center py-12",children:(0,l.jsxs)("p",{className:"text-red-400",children:["Error: ",o]})}),!s&&!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mb-12 justify-center",children:["All",...x.map(e=>e.category)].map(e=>(0,l.jsx)("button",{onClick:()=>m(e),className:"px-4 py-2 rounded-lg text-sm font-medium transition-all duration-300 ".concat(u===e?"bg-accent text-surface-900":"bg-surface-700 text-text-muted hover:bg-surface-600 hover:text-white"),children:e},e))}),(0,l.jsx)("div",{className:"space-y-8",children:f.map(e=>(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-accent mb-4",children:e.category}),(0,l.jsx)("div",{className:"space-y-4",children:e.items.map(e=>(0,l.jsx)(i,{id:e.id,question:e.question,answer:e.answer},e.id))})]},e.category))}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12 mt-16",children:[(0,l.jsx)("div",{className:"lg:col-span-2",children:(0,l.jsxs)("div",{className:"card",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold text-white mb-2",children:"Still have questions?"}),(0,l.jsx)("p",{className:"text-text-muted mb-6",children:"We're here to help. Reach out to us anytime."}),(0,l.jsxs)("a",{href:"/contact",className:"btn-primary inline-flex items-center gap-2",children:["Get in Touch",(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})}),(0,l.jsx)("div",{className:"relative h-80 rounded-lg overflow-hidden",children:(0,l.jsx)(a.default,{src:"/images/faq-visual.jpg",alt:"Biohazard VFX Process",fill:!0,className:"object-cover"})})]})]})]})})})})}}},e=>{e.O(0,[3063,8441,5964,7358],()=>e(e.s=68389)),_N_E=e.O()}]); |