import{r as o,j as e,H as i}from"./index-AZqeJDgJ.js"; import{A as d,a as h,E as m,b as x}from"./ExpandMore-CM4RVozJ.js"; import{C as f}from"./Container-BCv3UhV0.js"; import{T as n}from"./Typography-fX-lKplr.js"; import"./createSimplePaletteValueFilter-CsYga9Sc.js"; import"./ButtonBase-h8_ZS7Li.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(s){console.error("Error fetching data:",s)}})()},[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",align:"center",gutterBottom:!0,style:{fontWeight:"bold"},children:"Frequently Asked Questions!"}),a!=null&&a.faqs&&a.faqs.length>0?a.faqs.map((t,s)=>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${s}-content`,id:`panel${s}-header`,sx:{padding:"16px 24px",backgroundColor:"#f0f4f8",borderBottom:"1px solid #e0e0e0","&:hover":{backgroundColor:"#e8f0fe"}},children:e.jsx(n,{fontWeight:"bold",children:t.name})}),e.jsx(x,{sx:{padding:3},children:e.jsx("div",{dangerouslySetInnerHTML:{__html:t.answer}})})]},s)):e.jsx(n,{align:"center",color:"textSecondary",children:"Loading FAQs..."})]})})]})};export{v as default};
