import{r as i,d as n,B as l,h as o}from"./p-f8363b1b.js";import{g as t}from"./p-289be8ba.js";const e=class{constructor(l){i(this,l),this.fireenjinSubmit=n(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(){}render(){return[o("ion-content",{class:"ion-padding"},o("floodteam-title-bar",null,o("ion-router-link",{href:"/triggers"},"Triggers"),o("ion-buttons",{slot:"end"},o("ion-button",{fill:"solid",color:"primary",href:"/triggers/new"},"Add"))),o("div",{class:"ion-padding"},o("fireenjin-search-bar",{ref:i=>this.filterBarEl=i,paginationEl:this.paginationEl,filters:this.filters}),o("fireenjin-pagination",{ref:i=>this.paginationEl=i,resultsKey:"triggers",disableVirtualScroll:!0,removeDuplicates:!0,listEl:({result:i})=>{var n,l,t,e,s,r;return o("ion-item",{href:`/triggers/${i.id}`,detail:!0,lines:"full"},o("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:null==i?void 0:i.id,checked:null==i?void 0:i.active}),o("ion-grid",null,o("ion-row",{class:"ion-align-items-center ion-justify-content-between"},o("ion-col",null,o("ion-label",null,o("h2",null,i.name))),o("ion-col",null,(null==i?void 0:i.type)&&o("ion-chip",{outline:!0,style:{float:"right",opacity:"0.6"}},o("ion-icon",{name:"magnet"}),o("ion-label",null,null==i?void 0:i.type,"   =>  "," ",null==i?void 0:i.action),o("ion-icon",{name:!(null===(t=null===(l=null===(n=this.eventIconMap)||void 0===n?void 0:n[null==i?void 0:i.action])||void 0===l?void 0:l.includes)||void 0===t?void 0:t.call(l,"/"))&&this.eventIconMap[null==i?void 0:i.action],src:(null===(r=null===(s=null===(e=this.eventIconMap)||void 0===e?void 0:e[null==i?void 0:i.action])||void 0===s?void 0:s.includes)||void 0===r?void 0:r.call(s,"/"))&&this.eventIconMap[null==i?void 0:i.action]}))))))},display:"list",endpoint:"listTriggers",limit:20,query:this.query}))),o("floodteam-navigation-footer",null)]}};e.style="";export{e as app_trigger_list}