import{r as i,d as t,h as o,e as l}from"./p-03169580.js";import{s}from"./p-02c5cd3a.js";import{g as e}from"./p-c0e85cbf.js";import"./p-59c95c5f.js";import"./p-c9699503.js";import"./p-80de33dc.js";import"./p-c2fbed0d.js";import"./p-3a8e6af1.js";function n(){return((s===null||s===void 0?void 0:s.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,l,s;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=((s=(l=i===null||i===void 0?void 0:i.detail)===null||l===void 0?void 0:l.payload)===null||s===void 0?void 0:s.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=((s===null||s===void 0?void 0:s.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 l(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,l,s;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=((s=(l=i===null||i===void 0?void 0:i.detail)===null||l===void 0?void 0:l.payload)===null||s===void 0?void 0:s.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 l(this)}};export{a as floodteam_select_location,d as floodteam_select_status};
//# sourceMappingURL=p-efad9c18.entry.js.map