import './polyfills.server.mjs';
import{a as P}from"./chunk-XCWANWOG.mjs";import{a as H}from"./chunk-MGWD4USB.mjs";import"./chunk-PEXQ6CP4.mjs";import{E as d,G as F,Ga as k,Ha as c,I as y,Ja as v,Pa as C,Qa as B,Ra as O,T as o,V as M,Y as f,_ as D,db as s,ha as w,ia as L,ja as I,ka as S,la as N,ma as T,na as m,oa as a,pa as r,qa as p,s as l,va as A,w as b,x as q,xa as j,y as E,z as _,za as g}from"./chunk-I24PFG4Z.mjs";import"./chunk-N7QBYMCK.mjs";var x=class e{renderer2=l(M);accordionElement=l(y);extend=s.required();uniqueChildDefualtMargin=s(28);ngOnChanges(t){this.toggleExtendBody()}toggleExtendBody(){let t=this.accordionElement.nativeElement.children[0];if(t){if(this.extend()){this.renderer2.setStyle(this.accordionElement.nativeElement,"height",`${t.clientHeight+this.uniqueChildDefualtMargin()}px`);return}this.renderer2.setStyle(this.accordionElement.nativeElement,"height","0px")}}static \u0275fac=function(n){return new(n||e)};static \u0275dir=D({type:e,selectors:[["","appAccordionBodyAdjuster",""]],inputs:{extend:[1,"extend"],uniqueChildDefualtMargin:[1,"uniqueChildDefualtMargin"]},features:[F]})};function G(e,t){if(e&1){let n=A();a(0,"div",4)(1,"button",6),j("click",function(){let u=b(n).$index,R=g(2);return q(R.extends(u))}),a(2,"span",7),c(3),r(),E(),a(4,"svg",8),p(5,"path",9),r()(),_(),a(6,"div",10)(7,"p",11),c(8),r()()()}if(e&2){let n=t.$implicit,i=t.$index,u=g(2);w("data-aos",i%2==0?"fade-right":"fade-left")("data-aos-delay",i*200),o(3),v(" ",n.question," "),o(),k("rotate-180",i===u.extendedIndex()),o(2),m("extend",i===u.extendedIndex()),o(2),v(" ",n.answer," ")}}function Q(e,t){e&1&&(a(0,"p",5),c(1,"Sem informa\xE7\xF5es para mostrar"),r())}function U(e,t){if(e&1&&(a(0,"div",2),N(1,G,9,7,"div",4,S,!1,Q,2,0,"p",5),r()),e&2){let n=g();o(),T(n.faqs())}}function z(e,t){e&1&&p(0,"img",3)}var h=class e{extendedIndex=d(-1);faqs=s.required();isLoading=s.required();hasErrors=s.required();extends(t){if(t===this.extendedIndex()){this.extendedIndex.set(-1);return}this.extendedIndex.set(t)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-content"]],inputs:{faqs:[1,"faqs"],isLoading:[1,"isLoading"],hasErrors:[1,"hasErrors"]},decls:4,vars:1,consts:[[1,"section-content","py-16"],[1,"limited-container"],[1,"faqs","flex","flex-col","gap-8","items-center"],["src","assets/static/loader-primary.svg","alt","A carregar...",1,"w-9","h-9","mx-auto"],[1,"faq-container","w-full","max-w-[770px]","overflow-hidden","bg-[#FFECF0]","rounded-lg"],[1,""],[1,"header","flex","justify-between","p-7","gap-7","items-center","cursor-pointer","w-full",3,"click"],[1,"text-(color:--secondary)","!font-['Montserrat']","text-left","text-base","lg:text-lg","font-bold","leading-[120%]","-tracking-[2%]"],["width","18","height","17","viewBox","0 0 18 17","fill","none","xmlns","http://www.w3.org/2000/svg",1,"duration-[.5s]"],["d","M2.54004 4.76001L7.92582 10.1458C8.70687 10.9268 9.9732 10.9268 10.7543 10.1458L16.14 4.76001","stroke","#020B26","stroke-linecap","round"],["appAccordionBodyAdjuster","",1,"body","duration-[.3s]","bg-white","overflow-hidden",3,"extend"],[1,"!font-['Montserrat']","m-7","text-(color:--secondary)/80"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"div",1),L(2,U,4,1,"div",2)(3,z,1,0,"img",3),r()()),n&2&&(o(2),I(i.isLoading()?3:2))},dependencies:[x],encapsulation:2})};var J=()=>["/"],K=e=>({name:"P\xE1gina Inicial",route:e}),X=()=>({name:"FAQ"}),Y=(e,t)=>[e,t],V=class e{faqs=d([]);isLoading=d(!0);hasErrors=d(!0);aboutusFacade=l(P);ngOnInit(){this.getFaqs()}getFaqs(){this.isLoading.set(!0),this.aboutusFacade.faqs().subscribe({next:t=>{this.faqs.set(t),this.isLoading.set(!1),this.hasErrors.set(!1)},error:t=>{this.isLoading.set(!1),this.hasErrors.set(!0)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-faq"]],decls:5,vars:11,consts:[[1,"section-container"],[3,"breadcrumbs"],[1,"!font-['Unigeo']","font-semibold","text-3xl","leading-[120%]","tracking-[0%]"],[3,"faqs","hasErrors","isLoading"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"app-page-head",1)(2,"h1",2),c(3," Perguntas Frequentes "),r()(),p(4,"app-content",3),r()),n&2&&(o(),m("breadcrumbs",O(8,Y,B(5,K,C(4,J)),C(7,X))),o(3),m("faqs",i.faqs())("hasErrors",i.hasErrors())("isLoading",i.isLoading()))},dependencies:[H,h],encapsulation:2})};export{V as FaqComponent};
