import{r as i,d as t,h as s,e as o}from"./p-846bd001.js";import{g as e}from"./p-0e5e444e.js";import{g as l}from"./p-7477e169.js";import{s as n}from"./p-4ff8bb4b.js";import{g as a}from"./p-c0e85cbf.js";import"./p-5cd01495.js";import"./p-259f1737.js";import"./p-ae2fb9dc.js";import"./p-65879f9e.js";import"./p-dca1478c.js";const r=class{constructor(s){i(this,s),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.fireenjinSubmit=t(this,"fireenjinSubmit",7),this.name="serviceTypes",this.value=void 0,this.jobId=void 0,this.locationId=void 0,this.disabled=!1,this.icon="reader"}onTrigger(i){var t,s,o,e,l;(null===(o=null===(s=null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.event)||void 0===s?void 0:s.detail)||void 0===o?void 0:o.type)===this.name&&(this.value=(null===(l=null===(e=null==i?void 0:i.detail)||void 0===e?void 0:e.payload)||void 0===l?void 0:l.value)||null,this.fireenjinSubmit.emit({endpoint:this.jobId?"editJob":this.locationId?"editLocation":null,id:this.jobId||this.locationId||null,data:{serviceTypes:this.value||[]}}))}render(){const i=e();return s("ion-chip",{onClick:t=>{this.disabled||(t.preventDefault(),t.stopPropagation(),this.fireenjinTrigger.emit({event:t,name:"filter",type:this.name,el:this.selectLocationEl,payload:{control:{multiple:!0,name:this.name,label:"Service Types",icon:this.icon,options:i,value:this.value}}}))}},s("ion-icon",{name:this.icon,class:"ft-icon-style"}),s("ion-label",{class:"ion-text-capitalize"},(i||[]).filter((i=>(this.value||[]).includes(null==i?void 0:i.value))).map((i=>null==i?void 0:i.value)).join(", ")||"No Service Types Set"))}get selectLocationEl(){return o(this)}},d=class{constructor(s){i(this,s),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.fireenjinSubmit=t(this,"fireenjinSubmit",7),this.name="status",this.value=void 0,this.jobId=void 0,this.disabled=!1}onTrigger(i){var t,s,o,e;"select"===(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.name)&&this.selectLocationEl===(null===(s=null==i?void 0:i.detail)||void 0===s?void 0:s.el)&&(this.value=(null===(e=null===(o=null==i?void 0:i.detail)||void 0===o?void 0:o.payload)||void 0===e?void 0:e.value)||null,this.fireenjinSubmit.emit({endpoint:"editJob",id:this.jobId,data:{locationId:this.value}}))}render(){var i;return s("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:l(),value:this.value}}}))}},s("ion-icon",{name:"business",class:"ft-icon-style"}),s("ion-label",{class:"ion-text-capitalize"},(null===(i=((null==n?void 0:n.locations)||[]).find((i=>(null==i?void 0:i.id)===this.value)))||void 0===i?void 0:i.name)||"No Location Set"))}get selectLocationEl(){return o(this)}},h=class{constructor(s){i(this,s),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.fireenjinSubmit=t(this,"fireenjinSubmit",7),this.name="status",this.value=void 0,this.jobId=void 0,this.disabled=!1}onTrigger(i){var t,s,o,e;"select"===(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.name)&&this.selectStatusEl===(null===(s=null==i?void 0:i.detail)||void 0===s?void 0:s.el)&&(this.value=(null===(e=null===(o=null==i?void 0:i.detail)||void 0===o?void 0:o.payload)||void 0===e?void 0:e.value)||null,this.fireenjinSubmit.emit({endpoint:"editJob",id:this.jobId,data:{status:this.value}}))}render(){return s("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:a(),value:this.value}}}))}},s("ion-icon",{name:"help-circle",class:"ft-icon-style"}),s("ion-label",{class:"ion-text-capitalize"},this.value||"No Status"))}get selectStatusEl(){return o(this)}};export{r as floodteam_select_job_service_types,d as floodteam_select_location,h as floodteam_select_status}