import{r as i,d as t,h as o,e as s}from"./p-03169580.js";import{s as l}from"./p-e1ee6da1.js";import{g as e}from"./p-c0e85cbf.js";import"./p-59c95c5f.js";import"./p-3775d1fc.js";import"./p-80de33dc.js";import"./p-c2fbed0d.js";import"./p-5717491f.js";import"./p-de14d315.js";function n(){return((l===null||l===void 0?void 0:l.locations)||[]).map((i=>({label:(i===null||i===void 0?void 0:i.name)||"Unknown Location",value:i===null||i===void 0?void 0:i.id})))}let a=class{constructor(o){i(this,o);this.fireenjinTrigger=t(this,"fireenjinTrigger",7);this.fireenjinSubmit=t(this,"fireenjinSubmit",7);this.name="status";this.disabled=false}onTrigger(i){var t,o,s,l;if(((t=i===null||i===void 0?void 0:i.detail)===null||t===void 0?void 0:t.name)!=="select"||this.selectLocationEl!==((o=i===null||i===void 0?void 0:i.detail)===null||o===void 0?void 0:o.el))return;this.value=((l=(s=i===null||i===void 0?void 0:i.detail)===null||s===void 0?void 0:s.payload)===null||l===void 0?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=>{if(this.disabled)return;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:n(),value:this.value}}})}},o("ion-icon",{name:"business",class:"ft-icon-style"}),o("ion-label",{class:"ion-text-capitalize"},((i=((l===null||l===void 0?void 0:l.locations)||[]).find((i=>(i===null||i===void 0?void 0:i.id)===this.value)))===null||i===void 0?void 0:i.name)||"No Location Set"))}get selectLocationEl(){return s(this)}};let d=class{constructor(o){i(this,o);this.fireenjinTrigger=t(this,"fireenjinTrigger",7);this.fireenjinSubmit=t(this,"fireenjinSubmit",7);this.name="status";this.disabled=false}onTrigger(i){var t,o,s,l;if(((t=i===null||i===void 0?void 0:i.detail)===null||t===void 0?void 0:t.name)!=="select"||this.selectStatusEl!==((o=i===null||i===void 0?void 0:i.detail)===null||o===void 0?void 0:o.el))return;this.value=((l=(s=i===null||i===void 0?void 0:i.detail)===null||s===void 0?void 0:s.payload)===null||l===void 0?void 0:l.value)||null;this.fireenjinSubmit.emit({endpoint:"editJob",id:this.jobId,data:{status:this.value}})}render(){return o("ion-chip",{onClick:i=>{if(this.disabled)return;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:e(),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{a as floodteam_select_location,d as floodteam_select_status};
//# sourceMappingURL=p-db4b5a7e.entry.js.map