import{r as i,d as t,h as o,e as s}from"./p-f8363b1b.js";import{s as l}from"./p-c78d1e1b.js";import{g as n}from"./p-c0e85cbf.js";import"./p-3775d1fc.js";import"./p-80de33dc.js";import"./p-c2fbed0d.js";import"./p-5717491f.js";import"./p-de14d315.js";const e=class{constructor(o){i(this,o),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.fireenjinSubmit=t(this,"fireenjinSubmit",7),this.name="status",this.disabled=!1}onTrigger(i){var t,o,s,l;"select"===(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.name)&&this.selectLocationEl===(null===(o=null==i?void 0:i.detail)||void 0===o?void 0:o.el)&&(this.value=(null===(l=null===(s=null==i?void 0:i.detail)||void 0===s?void 0:s.payload)||void 0===l?void 0:l.value)||null,this.fireenjinSubmit.emit({endpoint:"editJob",id:this.jobId,data:{locationId:this.value}}))}render(){var i;return o("ion-chip",{onClick:i=>{this.disabled||(i.preventDefault(),i.stopPropagation(),this.fireenjinTrigger.emit({event:i,name:"filter",type:"location",el:this.selectLocationEl,payload:{control:{name:"location",label:"Location",icon:"business",options:((null==l?void 0:l.locations)||[]).map((i=>({label:(null==i?void 0:i.name)||"Unknown Location",value:null==i?void 0:i.id}))),value:this.value}}}))}},o("ion-icon",{name:"business",class:"ft-icon-style"}),o("ion-label",{class:"ion-text-capitalize"},(null===(i=((null==l?void 0:l.locations)||[]).find((i=>(null==i?void 0:i.id)===this.value)))||void 0===i?void 0:i.name)||"No Location Set"))}get selectLocationEl(){return s(this)}},a=class{constructor(o){i(this,o),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.fireenjinSubmit=t(this,"fireenjinSubmit",7),this.name="status",this.disabled=!1}onTrigger(i){var t,o,s,l;"select"===(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.name)&&this.selectStatusEl===(null===(o=null==i?void 0:i.detail)||void 0===o?void 0:o.el)&&(this.value=(null===(l=null===(s=null==i?void 0:i.detail)||void 0===s?void 0:s.payload)||void 0===l?void 0:l.value)||null,this.fireenjinSubmit.emit({endpoint:"editJob",id:this.jobId,data:{status:this.value}}))}render(){return o("ion-chip",{onClick:i=>{this.disabled||(i.preventDefault(),i.stopPropagation(),this.fireenjinTrigger.emit({event:i,name:"filter",type:"status",el:this.selectStatusEl,payload:{control:{name:"status",label:"Status",icon:"help-circle",options:n(),value:this.value}}}))}},o("ion-icon",{name:"help-circle",class:"ft-icon-style"}),o("ion-label",{class:"ion-text-capitalize"},this.value||"No Status"))}get selectStatusEl(){return s(this)}};export{e as floodteam_select_location,a as floodteam_select_status}