import{L as h}from"./Layout-Cjzy8bEI.js";import{I as m}from"./moment-DeOISj6Y.js";import{Z as p,r as f,c as i,o as l,a as v,b as e,t as u,g as b,A as y,F as x,j as w,n,e as _}from"./app-BhD6J0Va.js";import{s as k}from"./index-eWgxVo0t.js";import{t as z,S as q,p as A}from"./SearchInput-BhrnFjZw.js";import{m as H}from"./mapValues-DT3qyRA0.js";import{_ as j}from"./FlashMessages-DW2Y2mP0.js";import"./LoadingButton-BKJMdZnQ.js";const B={layout:h,components:{Icon:m,Head:p,SearchInput:q},props:{faqs:Object,title:String,filters:Object},data(){return{form:{search:this.filters.search}}},watch:{form:{deep:!0,handler:z(function(){this.$inertia.get(this.route("faq"),A(this.form),{preserveState:!0})},150)}},methods:{toggleActive(a){this.faqs.data[a].active=!this.faqs.data[a].active},sanitizeHtml:k,reset(){this.form=H(this.form,()=>null)}},created(){this.faqs.data.length&&(this.faqs.data[0].active=!0)}},C={class:"relative z-10 overflow-hidden bg-primary pt-[120px] pb-[100px] md:pt-[130px] lg:pt-[160px]"},S={class:"container"},F={class:"-mx-4 flex flex-wrap items-center"},L={class:"w-full px-4"},M={class:"text-center text-white"},V={class:"text-4xl font-semibold text-white"},Q={class:"relative py-16"},T={class:"container"},I={class:"flex w-full items-center justify-center mb-8"},N={class:"flex justify-center w-full"},D={class:"w-full lg:w-1/3"},O={class:"relative"},E=["placeholder"],U={id:"accordion-open","data-accordion":"open"},Z={id:"accordion-open-heading-1"},G=["onClick"],J={class:"flex items-center"},K=["innerHTML"];function P(a,t,o,R,d,c){const g=f("Head");return l(),i("div",null,[v(g,{title:"FAQ"}),e("section",C,[e("div",S,[e("div",F,[e("div",L,[e("div",M,[e("h1",V,u(a.$t("Frequently Asked Questions")),1)])])])]),t[1]||(t[1]=e("div",null,[e("span",{class:"absolute top-0 left-0 z-[-1]"},[e("img",{src:"/landing/images/header/shape-1.svg",alt:""})]),e("span",{class:"absolute top-0 right-0 z-[-1]"},[e("img",{src:"/landing/images/header/shape-2.svg",alt:""})])],-1))]),e("section",Q,[e("div",T,[e("div",I,[e("div",N,[e("form",D,[t[3]||(t[3]=e("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),e("div",O,[t[2]||(t[2]=e("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[e("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1)),b(e("input",{type:"search",id:"default-search","onUpdate:modelValue":t[0]||(t[0]=r=>d.form.search=r),class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:a.$t("Search your query in the FAQ items..."),required:""},null,8,E),[[y,d.form.search]])])])])]),e("div",U,[(l(!0),i(x,null,w(o.faqs.data,(r,s)=>(l(),i("div",{key:r.id},[e("h2",Z,[e("button",{type:"button",class:n(["flex items-center justify-between w-full p-5 font-medium text-left text-gray-500 border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800",{"rounded-t-xl":s===0,"border-b-0":s!==o.faqs.data.length-1}]),"data-accordion-target":"#accordion-open-body-1","aria-expanded":"true","aria-controls":"accordion-open-body-1",onClick:W=>c.toggleActive(s)},[e("span",J,[t[4]||(t[4]=e("svg",{class:"w-5 h-5 mr-2 shrink-0",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})],-1)),_(" "+u(r.name),1)]),(l(),i("svg",{"data-accordion-icon":"",class:n(["w-6 h-6 shrink-0",{"rotate-180":r.active}]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...t[5]||(t[5]=[e("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])],2))],10,G)]),e("div",{id:"accordion-open-body-1",class:n(["",{hidden:!r.active}]),"aria-labelledby":"accordion-open-heading-1"},[e("div",{class:n(["p-5 border border-gray-200 dark:border-gray-700 dark:bg-gray-900",{"border-b-0":s!==o.faqs.data.length-1,"border-t-0":s===o.faqs.data.length-1}])},[e("p",{class:"text-gray-500 dark:text-gray-400",innerHTML:c.sanitizeHtml(r.details)},null,8,K)],2)],2)]))),128))])])])])}const oe=j(B,[["render",P]]);export{oe as default};
