import{$b as a,P as s,Xc as u,_b as n,ha as c}from"./chunk-ATD4AEXQ.js";import{Ua as f,ca as o,da as h}from"./chunk-BXH3QC5E.js";var p=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=f({type:r});static \u0275inj=h({imports:[u]})}return r})();var d=(()=>{class r{getPeripheralAgents(){return n.getWorkstation()?.peripheralAgents}isPeripheralAgentWithAttachedDevices(e){return e&&(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 \u0275fac=function(i){return new(i||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{d as a,p as b};
