import{_ as k}from"./Cx_OC0SQ.js";import{_ as w}from"./DChqHtgW.js";import{g as f,r as d,j as C,c as s,o,a as t,t as v,F as q,k as N,b as u,n as B,w as y,l as F,v as E,T as S,d as $,m as j,p as A}from"./UpFGpe05.js";import{d as G}from"./KJ8e17vF.js";import"./DlAUqK2U.js";import"./DsXiT_L-.js";import"./zbMs9D6X.js";const V={class:"min-h-screen bg-gray-50"},z={class:"max-w-6xl mx-auto px-4 py-12 md:px-8 md:py-16"},I={key:0,class:"flex items-center justify-center p-12"},P={key:1,class:"rounded-lg border border-red-300 bg-red-50 px-6 py-8"},T={class:"text-red-700 text-center"},D={key:2,class:"space-y-4"},L={key:0,class:"rounded-lg border border-gray-300 bg-white px-6 py-8 text-center"},M=["onClick","aria-expanded"],H={class:"text-left font-semibold text-lg",style:{color:"var(--primary)"}},Q={class:"w-6 h-6",style:{color:"var(--primary)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},R={class:"border-t border-gray-200 bg-gray-50 px-6 py-4"},J={class:"text-base leading-relaxed",style:{color:"var(--fontGray)"}},K={class:"mt-16 rounded-lg px-8 py-12 text-center text-white",style:{"background-color":"var(--primary)"}},O={__name:"Faq",setup(x){const{$externalConf:p}=f(),m=p.siglaEmpresa,r=d(null),n=d([]),l=d(!0),c=d(null),{getPerguntasFrequentes:_}=G();C(async()=>{try{l.value=!0,c.value=null;const a=await _(m);a&&Array.isArray(a)?n.value=a.map(e=>({pergunta:e.pergunta||e.titulo||"",resposta:e.resposta||e.descricao||""})):a&&a.data&&(n.value=a.data.map(e=>({pergunta:e.pergunta||e.titulo||"",resposta:e.resposta||e.descricao||""})))}catch(a){c.value="Erro ao carregar as perguntas frequentes",console.error("Erro ao buscar FAQs:",a),n.value=[]}finally{l.value=!1}});const b=a=>{r.value===a?r.value=null:r.value=a};return(a,e)=>{const h=w;return o(),s("div",V,[t("div",z,[e[6]||(e[6]=t("div",{class:"mb-12"},[t("div",{class:"flex items-start gap-6"},[t("div",null,[t("h1",{class:"text-xl font-bold mb-2",style:{color:"var(--primary)"}}," Perguntas Frequentes "),t("p",{class:"text-lg pb-5",style:{color:"var(--fontGray)"}}," Encontre respostas para as dúvidas mais comuns sobre solicitações de faixa de domínio. ")])])],-1)),l.value?(o(),s("div",I,e[0]||(e[0]=[t("div",{class:"text-center"},[t("div",{class:"inline-block animate-spin rounded-full h-12 w-12 border-b-2",style:{"border-color":"var(--primary)"}}),t("p",{class:"mt-4",style:{color:"var(--fontGray)"}},"Carregando perguntas frequentes...")],-1)]))):c.value?(o(),s("div",P,[t("p",T,v(c.value),1)])):(o(),s("div",D,[n.value.length===0?(o(),s("div",L,e[1]||(e[1]=[t("p",{style:{color:"var(--fontGray)"}},"Nenhuma pergunta frequente disponível no momento",-1)]))):(o(!0),s(q,{key:1},N(n.value,(g,i)=>(o(),s("div",{key:i,class:"rounded-lg border border-gray-200 bg-white overflow-hidden transition-shadow hover:shadow-md"},[t("button",{class:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 transition-colors",onClick:U=>b(i),"aria-expanded":r.value===i},[t("h3",H,v(g.pergunta),1),t("div",{class:B(["flex-shrink-0 transition-transform duration-200",{"rotate-180":r.value===i}])},[(o(),s("svg",Q,e[2]||(e[2]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"},null,-1)])))],2)],8,M),u(S,{"enter-active-class":"transition-all duration-200 ease-out","leave-active-class":"transition-all duration-200 ease-in","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-96","leave-from-class":"opacity-100 max-h-96","leave-to-class":"opacity-0 max-h-0"},{default:y(()=>[F(t("div",R,[t("p",J,v(g.resposta),1)],512),[[E,r.value===i]])]),_:2},1024)]))),128))])),t("div",K,[e[4]||(e[4]=t("h2",{class:"text-2xl font-bold mb-4"},"Não encontrou sua resposta?",-1)),e[5]||(e[5]=t("p",{class:"mb-6 text-lg opacity-90"},"Entre em contato conosco para mais informações",-1)),u(h,{to:"/contact",class:"inline-block px-8 py-3 rounded-lg font-semibold transition-all hover:shadow-lg",style:{"background-color":"white",color:"var(--primary)"}},{default:y(()=>e[3]||(e[3]=[$(" Fale Conosco ")])),_:1,__:[3]})])])])}}},se={__name:"faq",setup(x){const{$externalConf:p}=f(),m=p.siglaBackground;return(r,n)=>{const l=k;return o(),s("div",{style:j({backgroundImage:`url('/img/svg/${A(m)}/background2.svg')`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",minHeight:"100vh"})},[u(l),u(O)],4)}}};export{se as default};
