import{r as o,j as e,H as i}from"./index-CjxF8fgu.js";import{A as d,a as h,E as m,b as x}from"./ExpandMore-DIZwwlAs.js";import{C as f}from"./Container-Bu0JJtU2.js";import{T as n}from"./Typography-BC8o0GSI.js";import"./createSimplePaletteValueFilter-CMy-QZ_W.js";import"./ButtonBase-CHpUpeFs.js";const v=({apiUrl:r})=>{const[a,l]=o.useState(null);return o.useEffect(()=>{(async()=>{try{const c=await(await fetch(r)).json();l(c)}catch(t){console.error("Error fetching data:",t)}})()},[r]),e.jsxs("div",{className:"row",children:[a&&a.headerTitle&&e.jsx(i,{children:e.jsx("title",{children:a.headerTitle})}),e.jsx("div",{className:"contact-us head-sect article-main",children:e.jsxs("div",{className:"section-dark page-banner list-banner-home more-height sect-blog half-height",children:[e.jsx("div",{className:"full-block page-banner-image as",style:{backgroundImage:`url(${a==null?void 0:a.banner})`,backgroundSize:"cover",backgroundPosition:"center"}}),e.jsx("div",{className:"full-block overlay",style:{backgroundColor:"rgba(0,0,0,0.4)"}}),(a==null?void 0:a.headerTitle)&&e.jsx("div",{className:"container h-100",children:e.jsx("div",{className:"row disp-table h-100",children:e.jsx("div",{className:"col col-md-12 h-100",children:e.jsx("div",{className:"page-banner-content h-100 d-flex flex-column justify-content-center text-white",children:e.jsx("div",{className:"fancy-title-hold text-initial clearfix",children:e.jsxs("h2",{className:"fancy-title animate",children:[a.headerTitle,a.sub_title&&e.jsx("span",{className:"sub-title-fnt d-block mt-2",style:{fontSize:"18px",fontWeight:"normal"},children:a.sub_title})]})})})})})})]})}),e.jsx("section",{className:"frm-cnt1",style:{padding:"60px 0",backgroundColor:"#f9f9f9"},children:e.jsxs(f,{maxWidth:"md",children:[e.jsx(n,{variant:"h4",className:"heading-primary-text dark-bg-light margin-bottom-space",align:"center",gutterBottom:!0,style:{fontWeight:"bold"},children:"Frequently Asked Questions"}),a!=null&&a.faqs&&a.faqs.length>0?a.faqs.map((s,t)=>e.jsxs(d,{sx:{marginBottom:2,boxShadow:2,borderRadius:2,"&:before":{display:"none"},backgroundColor:"#fff"},children:[e.jsx(h,{expandIcon:e.jsx(m,{}),"aria-controls":`panel${t}-content`,id:`panel${t}-header`,sx:{backgroundColor:"#f0f4f8",borderBottom:"1px solid #e0e0e0","&:hover":{backgroundColor:"#e8f0fe"}},children:e.jsx(n,{fontWeight:"bold",children:s.name})}),e.jsx(x,{sx:{padding:3},children:e.jsx("div",{dangerouslySetInnerHTML:{__html:s.answer}})})]},t)):e.jsx(n,{align:"center",color:"textSecondary",children:"Loading FAQs..."})]})})]})};export{v as default};
