import{b as g,c as d}from"./chunk-MANB3PJC.js";import{A as u,b as s,oa as v,uc as S}from"./chunk-CBXQYRPM.js";import{Ec as h,ca as o,da as l,fa as n,la as f}from"./chunk-LVXYIJUI.js";var c=(()=>{class e{constructor(r){this.peripheralAgentService=r}connectToSerialDeviceThroughPeripheralAgent(r,t,a){let i=new h;return i=i.append("async",!0),a&&(i=i.append("suppressToastError",!0)),this.peripheralAgentService.post(this.getURLForConnection(r),t,i)}getURLForConnection(r){return S.isNullOrUndefined(r)?null:`${this.getPeripheralAgentCommunicationProtocol()}://${r.hostname}:${r.portNumber}${this.peripheralAgentService.getBaseURL()}${u.CONNECT_TO_SERIAL_DEVICE}`}getPeripheralAgentCommunicationProtocol(){return d.properties.peripheralAgentSecureConnection?s.HTTP_SECURE:s.HTTP}static{this.\u0275fac=function(t){return new(t||e)(n(g))}}static{this.\u0275prov=o({token:e,factory:e.\u0275fac})}}return e})();var p=(()=>{class e{constructor(r){this.serialDeviceService=r}connectToSerialDeviceThroughPeripheralAgent(r,t,a){return this.serialDeviceService.connectToSerialDeviceThroughPeripheralAgent(r,t,a)}static{this.\u0275fac=function(t){return new(t||e)(n(c))}}static{this.\u0275prov=o({token:e,factory:e.\u0275fac})}}return e})();var A=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=f({type:e})}static{this.\u0275inj=l({providers:[c,p]})}}return e})();var m=class extends v{};export{m as a,p as b,A as c};
