import{r as l,B as i,h as o}from"./p-03169580.js";import{m as n}from"./p-5a032a89.js";import"./p-4cb16df5.js";import"./p-f44f0a67.js";const e="";let t=class{constructor(i){l(this,i);this.alerts=[];this.filters={}}async componentDidLoad(){if(!(i===null||i===void 0?void 0:i.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[o("ion-content",{class:"ion-padding"},o("floodteam-title-bar",null,o("ion-router-link",{href:"/alerts"},"Alerts"),o("ion-buttons",{slot:"end"},o("ion-button",{fill:"solid",color:"primary",href:"/alerts/new"},"Add"))),o("div",{class:"ion-padding"},o("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"}]})),o("ion-card",{class:"list-card"},o("ion-card-content",null,o("ion-list",null,this.alerts.map((l=>{var i,n,e,t,a;return o("ion-item",null,o("div",{slot:"start"},((i=l===null||l===void 0?void 0:l.types)===null||i===void 0?void 0:i.includes("email"))?o("ion-icon",{name:"mail"}):null),o("ion-label",null,o("h2",null,(n=l===null||l===void 0?void 0:l.template)===null||n===void 0?void 0:n.subject),o("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`:"")))})))))),o("floodteam-navigation-footer",null)]}};t.style=e;export{t as app_alert_list};
//# sourceMappingURL=p-cac47e88.entry.js.map