import{H as s,Y as c,dd as u,tc as n,uc as a}from"./chunk-CBXQYRPM.js";import{ca as o,da as h,la as f}from"./chunk-LVXYIJUI.js";var p=(()=>{class r{getPeripheralAgents(){return n.getWorkstation()?.peripheralAgents}isPeripheralAgentWithAttachedDevices(e){return e.serialDevices.length>0||!a.isNullOrUndefined(e.tcpDevice)||e.uhfDevices.length>0}filterEmptyPeripheralAgents(e){return e.filter(i=>this.isPeripheralAgentWithAttachedDevices(i))}getPeripheralAgentsWithSingleReadDevices(){let e=this.getPeripheralAgents();if(a.isNullOrEmptyArray(e))return null;e.forEach(t=>{t.serialDevices=t.serialDevices.filter(l=>this.isSerialDeviceForReadingIDCodes(l)),t.uhfDevices=t.uhfDevices.filter(l=>l.uhfDeviceType===c.SINGLE)});let i=n.getWorkstation().id;return e=e.filter(t=>t.workstation.workstationID===i),e&&this.isPeripheralAgentWithAttachedDevices(e.at(0))?e.at(0):null}isSerialDeviceForReadingIDCodes(e){return e.deviceType===s.BAR||e.deviceType===s.CHP}getPeripheralAgentsWithMultiReadDevices(){let e=this.getPeripheralAgents();return a.isNullOrEmptyArray(e)?[]:(e.forEach(i=>{i.serialDevices=i.serialDevices.filter(t=>t.deviceType===s.CHP),i.uhfDevices=i.uhfDevices.filter(t=>t.uhfDeviceType===c.MULTI)}),this.filterEmptyPeripheralAgents(e))}getPeripheralAgentsWithWeighingScales(){let e=this.getPeripheralAgents();return e.forEach(i=>{i.serialDevices=i.serialDevices.filter(t=>t.deviceType===s.WEI),i.tcpDevice=null,i.uhfDevices=[]}),this.filterEmptyPeripheralAgents(e)}arePeripheralAgentsWithWeighingScalesConfigured(){return!a.isNullOrEmptyArray(this.getPeripheralAgentsWithWeighingScales())}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var d=(()=>{class r{static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275mod=f({type:r})}static{this.\u0275inj=h({imports:[u]})}}return r})();export{p as a,d as b};
