import{a as R}from"./chunk-F5MI6XGL.js";import{b as A}from"./chunk-H5RVZQ43.js";import{a as I}from"./chunk-RVEFR64E.js";import{a as C,b as O}from"./chunk-3D3ZZLNX.js";import{c as P}from"./chunk-ZATDFETU.js";import{Ma as u}from"./chunk-QHAVDXDG.js";import{K as M,Z as N}from"./chunk-27KSTDMK.js";import{u as L,z as D}from"./chunk-GQAU5ACB.js";import{Bb as c,Ea as E,Ec as S,Ib as w,Jc as f,Ka as k,Nb as B,ac as _,cc as g,hc as r,ic as o,jc as a,kc as h,kd as T,qa as x,rc as F,sb as m,tc as p,vc as l,ya as b,za as y}from"./chunk-ISMRT7VU.js";var d=(function(t){return t.x86="x86",t.x64="x64",t})(d||{});function j(t,v){if(t&1&&h(0,"tis-subheader",1),t&2){l();let e=S(2);r("actionTemplate",e)("showBackButton",!1)}}function U(t,v){if(t&1){let e=F();o(0,"wk-button",11),p("clicked",function(){b(e);let n=l(2);return y(n.refreshPage())}),a()}if(t&2){let e=l(2);r("icon",e.icons.Reload)}}function W(t,v){if(t&1&&_(0,U,1,1,"wk-button",10),t&2){let e=l();g(e.isDialog?-1:0)}}var se=(()=>{class t{constructor(e,i,n,s){this.isDialog=e,this._router=i,this._themeService=n,this._birsanDesktopService=s,this.destroyRef=x(E),this.icons=u,this.iconsLogo=k(u.DeviceWithLogoLight),this.bitness=d}ngOnInit(){this._chagedSystemTheme(),this.iconsLogo.set(this._themeService.currentTheme===C.Dark?u.DeviceWithLogoDark:u.DeviceWithLogoLight),this.isDialog||this.refreshPage()}refreshPage(){this._router.navigateByUrl("/cabinet/settings/hardware")}downloadBirsanDesktop(e){this._birsanDesktopService.getLatestBirsanDesktop("0.0.0",e).pipe(D(this.destroyRef)).subscribe(i=>{let n=i.modules.find(s=>s.name==="tray");n&&(e===d.x64?window.open(this._replaceExeFor64(n.downloadUrl)):e===d.x86&&window.open(this._replaceExeFor86(n.downloadUrl)))})}_chagedSystemTheme(){this._themeService.currentTheme$$.pipe(D(this.destroyRef)).subscribe(e=>{this.iconsLogo.set(e===C.Dark?u.DeviceWithLogoDark:u.DeviceWithLogoLight)})}_replaceExeFor64(e){return e.replace("_x64.msi","_bundle_x64.exe")}_replaceExeFor86(e){return e.replace("_x86.msi","_bundle_x86.exe")}static{this.\u0275fac=function(i){return new(i||t)(c(N,8),c(L),c(O),c(A))}}static{this.\u0275cmp=w({type:t,selectors:[["app-birsan-connector-not-found"]],decls:14,vars:4,consts:[["headerTemplate",""],["title","\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u044F",3,"actionTemplate","showBackButton"],[1,"content"],[3,"icon"],[1,"font-st1","text"],[1,"font-b1-secondary","text"],[1,"buttons"],[1,"download-buttons"],["variant","alternative","label","\u0421\u043A\u0430\u0447\u0430\u0442\u044C (32 bit)",3,"clicked","icon"],["variant","alternative","label","\u0421\u043A\u0430\u0447\u0430\u0442\u044C (64 bit)",3,"clicked","icon"],["variant","secondary","stylingMode","outlined","label","\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",3,"icon"],["variant","secondary","stylingMode","outlined","label","\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",3,"clicked","icon"]],template:function(i,n){i&1&&(_(0,j,1,2,"tis-subheader",1),B(1,W,1,1,"ng-template",null,0,T),o(3,"tis-main-layout")(4,"div",2),h(5,"tis-svg",3),o(6,"h3",4),f(7,"\u041D\u0430 \u0432\u0430\u0448\u0435\u043C \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0435 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F Birsan Desktop"),a(),o(8,"h4",5),f(9," \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435, \u0438\u043B\u0438, \u0432 \u0441\u043B\u0443\u0447\u0430\u0435 \u0435\u0433\u043E \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044F, \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E "),a(),o(10,"div",6)(11,"div",7)(12,"wk-button",8),p("clicked",function(){return n.downloadBirsanDesktop(n.bitness.x86)}),a(),o(13,"wk-button",9),p("clicked",function(){return n.downloadBirsanDesktop(n.bitness.x64)}),a()()()()()),i&2&&(g(n.isDialog?-1:0),m(5),r("icon",n.iconsLogo()),m(7),r("icon",n.icons.Download),m(),r("icon",n.icons.Download))},dependencies:[I,R,P,M],styles:[`tis-main-layout[_ngcontent-%COMP%]{display:grid;min-height:calc(100% - 60px)}.content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--space-vertical-16)}.buttons[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:var(--space-vertical-16)}.buttons[_ngcontent-%COMP%]   .download-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--space-vertical-8)}.text[_ngcontent-%COMP%]{max-width:400px;text-align:center;margin:0}
/*# sourceMappingURL=birsan-connector-not-found.component-4ZE4FXAD.css.map */`],changeDetection:0})}}return t})();export{se as a};
//# sourceMappingURL=chunk-5JMSUB2R.js.map
