import{L as u}from"./Layout-CvLR9wQj.js";import{I as h,h as x}from"./moment-BywspGD9.js";import{S as b,t as g,p as v}from"./SearchInput-C5NjNnwl.js";import{P as k}from"./Pagination-CpO7GCRF.js";import{Z as y,i as w,r as i,c as a,a as l,m as _,b as e,f as S,y as B,F as j,j as L,o as r,t as n,w as V,e as I}from"./app-CK3cEAAe.js";import{S as M}from"./Subscribe-DhodLqop.js";import{m as N}from"./mapValues-BykAXOI1.js";import{_ as z}from"./FlashMessages-ByEdcHWZ.js";import"./LoadingButton-DQHYFAIm.js";const D={layout:u,components:{Subscribe:M,Icon:h,Head:y,Link:w,Pagination:k,SearchInput:b},props:{kb:Object,types:Array,title:String,filters:Object},data(){return{form:{search:this.filters.search}}},watch:{form:{deep:!0,handler:g(function(){this.$inertia.get(this.route("kb"),v(this.form),{preserveState:!0})},150)}},methods:{reset(){this.form=N(this.form,()=>null)}},created(){this.moment=x}},Y={class:"pt-20 pb-10 lg:pt-[120px] lg:pb-20"},C={class:"container"},H={class:"flex w-full items-center justify-center pb-16"},F={class:"flex justify-center w-full"},K={class:"w-full lg:w-1/3"},O={class:"relative"},P={key:0,class:"-mx-4 flex flex-wrap"},T={class:"wow fadeInUp group mb-10","data-wow-delay":".1s"},U={class:"mb-5 inline-block rounded bg-primary py-1 px-4 text-center text-xs font-semibold leading-loose text-white"},q={class:"text-base text-body-color"},A={key:1};function E(d,s,o,Z,c,G){const p=i("Head"),m=i("Link"),f=i("pagination");return r(),a("div",null,[l(p,{title:"Knowledge Base"}),s[3]||(s[3]=_('<section class="relative z-10 overflow-hidden bg-primary pt-[120px] pb-[100px] md:pt-[130px] lg:pt-[160px]"><div class="container"><div class="-mx-4 flex flex-wrap items-center"><div class="w-full px-4"><div class="text-center"><h1 class="text-4xl font-semibold text-white">Knowledge Base</h1></div></div></div></div><div><span class="absolute top-0 left-0 z-[-1]"><img src="/landing/images/header/shape-1.svg" alt=""></span><span class="absolute top-0 right-0 z-[-1]"><img src="/landing/images/header/shape-2.svg" alt=""></span></div></section>',1)),e("section",Y,[e("div",C,[e("div",H,[e("div",F,[e("form",K,[s[2]||(s[2]=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,[s[1]||(s[1]=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)),S(e("input",{type:"search",id:"default-search","onUpdate:modelValue":s[0]||(s[0]=t=>c.form.search=t),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:"Search in knowledge base...",required:""},null,512),[[B,c.form.search]])])])])]),o.kb.data.length?(r(),a("div",P,[(r(!0),a(j,null,L(o.kb.data,t=>(r(),a("div",{class:"w-full px-4 md:w-1/2 lg:w-1/3",key:t.id},[e("div",T,[e("div",null,[e("span",U,n(d.moment(t.updated_at).format("MMM DD, YYYY")),1),e("h3",null,[l(m,{href:d.route("kb.details",t.id),class:"mb-4 inline-block text-xl font-semibold text-dark hover:text-primary sm:text-2xl lg:text-xl xl:text-2xl"},{default:V(()=>[I(n(t.title),1)]),_:2},1032,["href"])]),e("p",q,n(t.details.length<70?t.details:t.details.substring(0,70)+"..."),1)])])]))),128))])):(r(),a("div",A,"No knowledge base items found!")),l(f,{class:"mt-6",links:o.kb.links},null,8,["links"])])])])}const ae=z(D,[["render",E]]);export{ae as default};
