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