import{k as v,l as E,n as _,q as h}from"./chunk-NJYCNYHB.js";import{Ib as u,La as n,Vb as o,Wa as d,Wb as a,ja as l,lb as c,mb as x,mc as p,nc as s,vb as i,wb as e,xb as f}from"./chunk-ZHRPBG7M.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
