import{g as m,i as c}from"./chunk-7R64RXQ7.js";import{f as h}from"./chunk-DR3RUOXE.js";import{va as p}from"./chunk-JNANLRYG.js";import{A as r,Vc as a,Wc as u,X as o,ea as l,pb as d}from"./chunk-PCDQIHDN.js";var n=(function(i){return i[i.Inplace=1]="Inplace",i[i.WithDetails=2]="WithDetails",i[i.DeviceSettings=3]="DeviceSettings",i[i.RequiredAction=4]="RequiredAction",i})(n||{});var x=(()=>{let s=class s{constructor(){this.listDetailService=l(c),this.inplaceActionGroupTitle=u("Actions"),this.actionSelected=a()}set actions(e){e?(this.requirementActions=e.filter(t=>t.group===n.RequiredAction),this.deviceSettingActions=e.filter(t=>t.group===n.DeviceSettings),this.inplaceActions=e.filter(t=>t.group===n.Inplace),this.detailActions=e.filter(t=>t.group===n.WithDetails)):(this.requirementActions=void 0,this.deviceSettingActions=void 0,this.inplaceActions=void 0,this.detailActions=void 0)}ngOnInit(){this.selectionSubscription=this.listDetailService.editingRequest.pipe(r(e=>e.editMode===m.Update),o(e=>this.selectedItemIds=e.selection)).subscribe(e=>this.handleSelectionChanged(e.selection))}ngOnDestroy(){this.selectionSubscription.unsubscribe()}onActionSelected(e){setTimeout(()=>this.actionSelected.emit(e),150)}executeInplaceAction(e){let t=e.command.processor;t.items=this.selectedItemIds,t.run()}actionTracking(e,t){return t.title}dataTestId(e,t){return`item.action.${e}.${t.title?.toLowerCase().replace(/\s+/g,"-")}`}};s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=d({type:s,inputs:{inplaceActionGroupTitle:[1,"inplaceActionGroupTitle"]},outputs:{actionSelected:"actionSelected"}});let i=s;return i})();var f=class{constructor(s){this.injector=s,this.listDetailService=s.get(c),this.deviceMonitor=s.get(h),this.dialog=s.get(p)}get selectedIds(){return this.listDetailService.selection.selected}run(){this.executeAction(this.selectedIds)}isEnabled(s,g,e){return!0}isBusy(){return!1}};export{n as a,f as b,x as c};
