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)},29706:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var l=s(95155),r=s(66766),n=s(12115);function a(e){let{src:t,alt:s="Image",placeholderText:a="Image Coming Soon",placeholderSize:c,...i}=e,[o,d]=(0,n.useState)(!1),{width:u,height:x,fill:m}=i,h=(0,n.useMemo)(()=>{let e="number"==typeof u?u:(null==c?void 0:c.width)||1200,t="number"==typeof x?x:(null==c?void 0:c.height)||(m?675:800),s=encodeURIComponent(a);return"https://placehold.co/".concat(e,"x").concat(t,"/111113/CCCCCC?text=").concat(s)},[u,x,m,c,a]),f=!t||""===t.trim()||o?h:t;return(0,l.jsx)(r.default,{...i,src:f,alt:s,onError:()=>d(!0)})}},32941:(e,t,s)=>{"use strict";s.d(t,{mc:()=>a,wn:()=>n,xA:()=>c,zY:()=>r});var l=s(95155);function r(e){let{title:t,subtitle:s,actions:r}=e;return(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-3xl font-display tracking-tight text-white mb-2",children:t}),s&&(0,l.jsx)("p",{className:"text-text-muted text-base max-w-3xl",children:s})]}),r&&(0,l.jsx)("div",{className:"flex items-center gap-2",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:"w-full px-4 sm:px-6 lg:px-8 ".concat(s),children:t})}function c(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-3",md:"gap-4",lg:"gap-6"}[r]," ").concat(n),children:t})}s(12115)},68389:(e,t,s)=>{Promise.resolve().then(s.bind(s,96592))},96592:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var l=s(95155),r=s(12115),n=s(32941),a=s(29706);function c(e){let{question:t,answer:s,id:n}=e,[a,c]=(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:()=>c(!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 i(){let[e,t]=(0,r.useState)([]),[s,i]=(0,r.useState)(!0),[o,d]=(0,r.useState)(null),[u,x]=(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),i(!1)}catch(e){console.error("Error fetching FAQs:",e),d("Failed to load FAQs"),i(!1)}})()},[]);let m=[{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)}],h="All"===u?m:m.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",...m.map(e=>e.category)].map(e=>(0,l.jsx)("button",{onClick:()=>x(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:h.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)(c,{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",placeholderText:"FAQ Visual"})})]})]})]})})})})}}},e=>{e.O(0,[6766,8441,5964,7358],()=>e(e.s=68389)),_N_E=e.O()}]); |