import{r as l,B as o,h as i}from"./p-03169580.js";import{m as n}from"./p-3bc4f2ce.js";import"./p-4cb16df5.js";import"./p-f44f0a67.js";const e="";let t=class{constructor(o){l(this,o);this.alerts=[];this.filters={}}async componentDidLoad(){if(!(o===null||o===void 0?void 0:o.isBrowser))return;(await n.create({component:"modal-flow",componentProps:{headerTitle:"Add an Alert",steps:[{fields:[{beforeHTML:"<h1>What is the subject of the email?</h1>",name:"subject"}]},{fields:[{beforeHTML:"<h1>What is the type of alert?</h1>",name:"type",type:"radios",value:"email",options:[{label:"Email",value:"email"},{label:"Feed Card",value:"feed"}]}]}]}})).present()}render(){return[i("ion-content",{class:"ion-padding"},i("floodteam-title-bar",null,i("ion-router-link",{href:"/alerts"},"Alerts"),i("ion-buttons",{slot:"end"},i("ion-button",{fill:"solid",color:"primary",href:"/alerts/new"},"Add"))),i("div",{class:"ion-padding"},i("fireenjin-search-bar",{ref:l=>this.filterBarEl=l,paginationEl:this.paginationEl,filters:[{name:"locationId",label:"Location",endpoint:"listLocations",value:this.locationId,icon:"business",resultsKey:"locations"}]})),i("ion-card",null,i("ion-card-content",null,i("ion-list",null,this.alerts.map((l=>{var o,n,e,t,a;return i("ion-item",null,i("div",{slot:"start"},((o=l===null||l===void 0?void 0:l.types)===null||o===void 0?void 0:o.includes("email"))?i("ion-icon",{name:"mail"}):null),i("ion-label",null,i("h2",null,(n=l===null||l===void 0?void 0:l.template)===null||n===void 0?void 0:n.subject),i("p",null,"Sent to"," ",((e=l===null||l===void 0?void 0:l.emails)===null||e===void 0?void 0:e.length)?`${l.emails.length} Emails`:""," ",((t=l===null||l===void 0?void 0:l.userIds)===null||t===void 0?void 0:t.length)?`${((a=l===null||l===void 0?void 0:l.emails)===null||a===void 0?void 0:a.length)?"and ":""}${l.userIds.length} Users`:"")))})))))),i("floodteam-navigation-footer",null)]}};t.style=e;export{t as app_alert_list};
//# sourceMappingURL=p-66708b8a.entry.js.map