1import{_ as g}from"./index-CVuSjWCq.js";import{a,j as e}from"./query-vendor-BB0JUlq_.js";import{S as j}from"./SEO-wcQthF5D.js";import{S as w}from"./search-U2F7YYEh.js";import{C as b}from"./chevron-up-DCM66HMb.js";import{C as N}from"./chevron-down-O6I9_XNE.js";import{M as y,r as v}from"./index-BPI0DfIe.js";import"./react-vendor-BIjsaQ6L.js";import"./ui-vendor-CwH6wFZJ.js";function _(){const[o,i]=a.useState([]),[c,m]=a.useState(!0),[r,u]=a.useState(""),[l,x]=a.useState(new Set);a.useEffect(()=>{h()},[]);const h=async()=>{try{const{apiFetch:s}=await g(async()=>{const{apiFetch:n}=await import("./api-CyvozDRd.js");return{apiFetch:n}},[]),t=await s("/api/faq");i(Array.isArray(t)?t:[])}catch(s){console.error("Error loading FAQs:",s),i([])}finally{m(!1)}},p=s=>{const t=new Set(l);t.has(s)?t.delete(s):t.add(s),x(t)},d=o.map(s=>({...s,faqs:s.faqs.filter(t=>r===""||t.question.toLowerCase().includes(r.toLowerCase())||t.answer.toLowerCase().includes(r.toLowerCase()))})).filter(s=>s.faqs.length>0),f={"@context":"https://schema.org","@type":"FAQPage",mainEntity:o.flatMap(s=>s.faqs.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer.replace(/<[^>]*>/g,"")}})))};return e.jsxs(e.Fragment,{children:[e.jsx(j,{title:"Frequently Asked Questions | InTune Music | West Lothian",description:"Find answers to common questions about music lessons at InTune Music. Learn about our instruments, pricing, scheduling, and what makes us West Lothian's leading music school.",keywords:"music lessons FAQ, InTune Music questions, music tuition help, guitar lessons FAQ, piano lessons FAQ, West Lothian music school, music lesson questions",url:"/faq",structuredData:f}),e.jsx("div",{className:"container mx-auto py-12 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-muted-foreground",children:"Everything you need to know about InTune Music lessons"})]}),e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"relative",children:[e.jsx(w,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search FAQs...",value:r,onChange:s=>u(s.target.value),className:"w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary"})]})}),c?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading FAQs..."})]}):d.length===0?e.jsx("div",{className:"text-center py-12 border rounded-lg bg-muted/30",children:e.jsx("p",{className:"text-lg text-muted-foreground",children:r?"No FAQs match your search.":"No FAQs available yet."})}):e.jsx("div",{className:"space-y-8",children:d.map(s=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"border-b pb-2",children:[e.jsx("h2",{className:"text-2xl font-bold",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.description})]}),e.jsx("div",{className:"space-y-3",children:s.faqs.map(t=>{const n=l.has(t.id);return e.jsxs("div",{className:"border rounded-lg overflow-hidden hover:shadow-md transition-shadow bg-card",children:[e.jsxs("button",{onClick:()=>p(t.id),className:"w-full flex items-center justify-between p-4 text-left hover:bg-muted/50 transition-colors",children:[e.jsx("h3",{className:"text-lg font-semibold pr-4",children:t.question}),n?e.jsx(b,{className:"h-5 w-5 flex-shrink-0 text-primary"}):e.jsx(N,{className:"h-5 w-5 flex-shrink-0 text-muted-foreground"})]}),n&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsx("div",{className:"prose max-w-none text-muted-foreground dark:prose-invert",children:e.jsx(y,{remarkPlugins:[v],children:t.answer})})})]},t.id)})})]},s.id||"other"))}),e.jsxs("div",{className:"mt-12 p-6 border rounded-lg bg-muted/30 text-center",children:[e.jsx("h3",{className:"text-xl font-bold mb-2",children:"Still have questions?"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Can't find the answer you're looking for? Get in touch with our team."}),e.jsx("a",{href:"/contact",className:"inline-block px-6 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Contact Us"})]})]})})]})}export{_ as default};
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.