1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Card-BPgBU8Tx.js","assets/index-sUPB-bMu.js","assets/index-CjsJg3P0.css","assets/optimizedImage-CqpgVSCQ.js","assets/Card-DB-SwaON.css"])))=>i.map(i=>d[i]); 2import{_ as I,m as A,j as N,k as R,b as _,c as i,o as n,g as o,d as b,e as g,w as m,Z as f,t as r,a as e,a1 as T,ai as k,F as D,s as y,a4 as L,n as P,p as M}from"./index-sUPB-bMu.js";import{a as O}from"./ebd-cVCg3Zmt.js";import{m as U}from"./menuItemNameMixin-D-Sxrcvm.js";const F=R(()=>M(()=>import("./Card-BPgBU8Tx.js"),__vite__mapDeps([0,1,2,3,4]))),G={name:"EbdsAll",components:{Card:F},mixins:[U],data(){return{ebds:null,categories:null,loading:null,alertBox:{type:null,message:null},selected:"All",searchTerm:null}},computed:{...N(["churchData"]),availableEbds(){return this.selected==="All"&&this.searchTerm?this.searched:this.selected!=="All"&&!this.searchTerm?this.selectedCategory(this.selected):this.selected!=="All"&&this.searchTerm?this.searched.filter(t=>t.categorias.find(a=>a.nome===this.selected)):this.ebds},searched(){return this.ebds.filter(t=>t.descricao.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().includes(this.searchTerm.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase()))}},async created(){this.$useHead({title:this.$t("EBD.MODULE_NAME")}),await this.getEbdsList()},methods:{...A(["appSetLoadingState"]),async getEbdsList(){this.ebds=null,this.loading=!0;try{const t=await O.getEbdList(this.churchData.id);t.data.data.length&&(this.ebds=t.data.data,this.categories=this.ebdGetCategories())}catch{this.alertBox={type:"error",message:this.$t("EBD.INDEX.MESSAGE.ERROR.GENERIC")}}this.loading=!1},ebdGetCategories(){return Object.values(this.ebds.reduce((a,h)=>{const c=a;return h.categorias.forEach(({nome:s})=>{c[s]||(c[s]={nome:s,ebds:[]}),c[s].ebds.push(h)}),c},{}))},selectedCategory(t){return this.ebds.filter(h=>h.categorias.find(c=>c.nome===t))},clear(){this.searchTerm&&(this.searchTerm=null)}}},w={class:"ebd-page container"},V={key:1,class:"loading"},x={class:"loading__filters"},H={class:"loading__select"},X={class:"loading__search"},z={class:"loading__list"},Y={class:"loading__item"},j={class:"loading__item"},W={class:"loading__item"},Z={key:2,class:"ebds-list"},q={class:"ebds-list__filters"},J={class:"category-search input-item"},K={class:"category-search__label"},Q={value:"All",class:"category-option"},$=["value"],ee={class:"input-search input-item"},te={class:"input-search__label"},se=["placeholder"],oe={class:"ebds-list__content"},ae={key:0,class:"notfound"},ne={class:"notfound__title"},le={class:"notfound__subtitle"},ie={key:3,class:"notfound__content"},re={class:"notfound__content__ilustration"},ce={class:"notfound__content__title"},de={class:"notfound__content__subtitle"};function _e(t,a,h,c,s,E){const B=_("PageContentHeader"),v=_("AlertBox"),u=_("SkeletonElement"),d=_("SvgElement"),C=_("Card"),S=_("router-link");return n(),i("div",w,[o(B,{padded:!0},{default:m(()=>[f(r(t.menuItemName("INPCAPP_EBD")||t.$t("EBD.MODULE_NAME")),1)]),_:1}),s.alertBox.message?(n(),b(v,{key:0,type:s.alertBox.type},{default:m(()=>[f(r(s.alertBox.message),1)]),_:1},8,["type"])):g("",!0),s.loading?(n(),i("div",V,[e("div",x,[e("div",H,[o(u,{height:"3rem"})]),e("div",X,[o(u,{height:"3rem"})])]),e("div",z,[e("div",Y,[o(u,{height:"100%"})]),e("div",j,[o(u,{height:"100%"})]),e("div",W,[o(u,{height:"100%"})])])])):s.ebds?(n(),i("div",Z,[e("div",q,[e("div",J,[e("div",K,[o(d,{name:"Filter",title:"Filter",class:"category-search__icon"}),T(e("select",{"onUpdate:modelValue":a[0]||(a[0]=l=>s.selected=l),class:"input-item__select"},[e("option",Q,r(t.$t("EBD.INDEX.FILTERS.DROPDOWN")),1),(n(!0),i(D,null,y(s.categories,(l,p)=>(n(),i("option",{key:p,value:l.nome,class:"category-option"},r(l.nome),9,$))),128))],512),[[k,s.selected]]),o(d,{class:"arrow-down",name:"ChevronBottom",title:"ChevronBottom"})])]),e("div",ee,[e("label",te,[o(d,{name:"Search",title:"Search",class:"svg"}),T(e("input",{"onUpdate:modelValue":a[1]||(a[1]=l=>s.searchTerm=l),type:"text",class:P(["input-item__search search",{"input-item__search--hasSearchTerm":s.searchTerm}]),placeholder:t.$t("EBD.INDEX.FILTERS.INPUT")},null,10,se),[[L,s.searchTerm]]),s.searchTerm?(n(),i("div",{key:0,class:"clear",onClick:a[2]||(a[2]=(...l)=>E.clear&&E.clear(...l))},[o(d,{name:"Close",title:"Close"}
2)])):g("",!0)])])]),e("div",oe,[(n(!0),i(D,null,y(E.availableEbds,(l,p)=>(n(),b(C,{key:p,ebd:l},null,8,["ebd"]))),128)),E.availableEbds.length?g("",!0):(n(),i("div",ae,[o(v,null,{icon:m(()=>[o(d,{name:"Alert",title:t.$t("ALERT_MESSAGE.TITLE"),class:"notfound__icon"},null,8,["title"])]),default:m(()=>[e("h3",ne,r(t.$t("EBD.INDEX.MESSAGE.ERROR.SEARCH_TITLE")),1),e("p",le,r(t.$t("EBD.INDEX.MESSAGE.ERROR.SEARCH_DESCRIPTION")),1)]),_:1})]))])])):(n(),i("div",ie,[e("div",re,[a[3]||(a[3]=e("div",{class:"cover"},null,-1)),o(d,{name:"IlustraEbd",type:"other",class:"notfound-icon"})]),e("h1",ce,r(t.$t("EBD.EMPTY.TITLE")),1),e("h2",de,r(t.$t("EBD.EMPTY.SUBTITLE")),1),o(S,{to:{name:"churchHome"},class:"btn btn--color-primary notfound__content__button"},{default:m(()=>[f(r(t.$t("EBD.EMPTY.BUTTON")),1)]),_:1})]))])}const Ee=I(G,[["render",_e],["__scopeId","data-v-f5028688"]]);export{Ee as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.