import{r as i,d as n,B as t,h as e}from"./p-03169580.js";import{g as o}from"./p-b1e16c53.js";const l="";let r=class{constructor(t){i(this,t);this.fireenjinSubmit=n(this,"fireenjinSubmit",7);this.eventIconMap={alert:"notifications"};this.filters=[{name:"type",label:"Event Type",icon:"magnet",options:o()}]}onSearchInput(i){this.query=i.target.value}componentDidLoad(){if(!(t===null||t===void 0?void 0:t.isBrowser))return}render(){return[e("ion-content",{class:"ion-padding"},e("floodteam-title-bar",null,e("ion-router-link",{href:"/triggers"},"Triggers"),e("ion-buttons",{slot:"end"},e("ion-button",{fill:"solid",color:"primary",href:"/triggers/new"},"Add"))),e("div",{class:"ion-padding"},e("fireenjin-search-bar",{ref:i=>this.filterBarEl=i,paginationEl:this.paginationEl,filters:this.filters}),e("fireenjin-pagination",{ref:i=>this.paginationEl=i,resultsKey:"triggers",disableVirtualScroll:true,removeDuplicates:true,listEl:({result:i})=>e("ion-item",{href:`/triggers/${i.id}`,detail:true,lines:"full"},e("ion-toggle",{slot:"start",name:"active",onClick:i=>{i.preventDefault();i.stopPropagation()},onIonChange:n=>this.fireenjinSubmit.emit({endpoint:"editTrigger",id:i.id,data:{active:n.target.checked}}),value:i===null||i===void 0?void 0:i.id,checked:i===null||i===void 0?void 0:i.active}),e("ion-grid",null,e("ion-row",{class:"ion-align-items-center ion-justify-content-between"},e("ion-col",null,e("ion-label",null,e("h2",null,i.name))),e("ion-col",null,(i===null||i===void 0?void 0:i.type)&&e("ion-chip",{outline:true,style:{float:"right",opacity:"0.6"}},e("ion-icon",{name:"magnet"}),e("ion-label",null,i===null||i===void 0?void 0:i.type,"   =>  "," ",i===null||i===void 0?void 0:i.action),e("ion-icon",{name:this.eventIconMap[i===null||i===void 0?void 0:i.action]})))))),display:"list",endpoint:"listTriggers",limit:20,query:this.query}))),e("floodteam-navigation-footer",null)]}};r.style=l;export{r as app_trigger_list};
//# sourceMappingURL=p-f57690e5.entry.js.map