import i from"./TopBar.8157552e.js";import n from"./Container.f87d9f62.js";import a from"./Content.e22a1fd6.js";import m from"./Page.3927bdbf.js";import l from"./PageHeader.a5f457a5.js";import p from"./PageHeaderTitle.3ed783af.js";import f from"./PageBody.dec1fae1.js";import c from"./Button.f17dffc9.js";import u from"./List.d5d221b1.js";import _ from"./ListItem.ee1e88fb.js";import d from"./StatusBubble.4f1d8322.js";import y from"./NotificationBadge.b6fae3d5.js";import v from"./MainLayout.17290af6.js";import h from"./SettingsLayout.3305573b.js";import g from"./SettingsSegment.e8fdfb41.js";import b from"./Pagination.a93b6f75.js";import{u as s}from"./notification.db2f2ae7.js";import T from"./Tabs.de9dab32.js";import S from"./Table.5d32c28c.js";import x from"./TableHead.1eed799b.js";import z from"./TableHeader.44bdf327.js";import P from"./TableRow.6382a60a.js";import B from"./TableBody.c78326a3.js";import H from"./TableData.c69a64ca.js";import{n as k}from"./plugin-vue2_normalizer.000ba15c.js";import"./TopBar.27b84f08.js";import"./Dropdown.d1060583.js";import"./DropdownList.02c48c2f.js";import"./DropdownListItem.ac31464c.js";import"./IconMoon.ade3e41b.js";import"./IconSun.8809e5d7.js";import"./IconSearch.27dac870.js";import"./IconButton.eadc8d3d.js";import"./Breadcrumbs.d39e2491.js";import"./BreadcrumbsItem.da3f8155.js";import"./TopBarTabBarContainer.3bdb2bb3.js";import"./TabBar.c1d45ed5.js";import"./TabBarItem.e9886f0a.js";import"./Confirm.888708f1.js";import"./Notification.d432029f.js";import"./IconDanger.2f6e115d.js";import"./IconWarning.ca92fb65.js";import"./IconSuccess.09b85716.js";import"./IconInfo.ad7662f9.js";import"./SearchPalette.282fdde5.js";import"./app.79e1f42d.js";const w={layout:v,metaInfo(){return{title:`${this.__("Synchronize servers")}`}},components:{TopBar:i,Container:n,Content:a,Page:m,PageHeader:l,PageHeaderTitle:p,PageBody:f,Button:c,List:u,ListItem:_,StatusBubble:d,NotificationBadge:y,SettingsLayout:h,SettingsSegment:g,Pagination:b,Tabs:T,Table:S,TableHead:x,TableHeader:z,TableRow:P,TableBody:B,TableData:H},props:{availableServers:Array},data(){return{loading:!1}},methods:{useNotification:s,syncServer(t){this.loading=!0,window.axios.post(this.route("admin.services.servers.sync"),t).then(()=>{this.loading=!1,s({variant:"success",title:"Servers",message:`Server ${t.name} has been synchronized to this system`})}).catch(e=>{this.loading=!1})},syncAll(){this.loading=!0,window.axios.post(this.route("admin.services.servers.sync.all")).then(()=>{this.loading=!1,s({variant:"success",title:"Servers",message:"All servers have been synchronized to this system"})}).catch(t=>{this.loading=!1})}}};var C=function(){var e=this,r=e._self._c;return r("Page",[r("TopBar"),r("Content",[r("Container",[r("PageHeader",{scopedSlots:e._u([{key:"start",fn:function(){return[r("PageHeaderTitle",[e._v(e._s(e.__("Synchronize servers")))])]},proxy:!0}])}),r("PageBody",[r("SettingsLayout",{scopedSlots:e._u([{key:"nav",fn:function(){return[r("Tabs")]},proxy:!0},{key:"segments",fn:function(){return[r("SettingsSegment",{scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Overview")))]},proxy:!0},{key:"subtitle",fn:function(){return[e._v(e._s(e.__("You can synchronize your servers here. It is safe to synchronize already existing servers. If you have installed a extra PHP version for example, you can synchronize to update the versions here."))+" ")]},proxy:!0},{key:"content",fn:function(){return[r("Button",{attrs:{size:"sm",disabled:e.loading},on:{click:e.syncAll}},[e._v(" "+e._s(e.__("Synchronize all servers"))+" ")]),r("Table",{attrs:{caption:"Available servers overview"}},[r("TableHead",[r("TableRow",[r("TableHeader",[e._v(e._s(e.__("Name")))]),r("TableHeader",[e._v(e._s(e.__("IP address")))]),r("TableHeader")],1)],1),r("TableBody",e._l(e.availableServers,function(o){return r("TableRow",{key:o.id},[r("TableData",[e._v(e._s(o.name))]),r("TableData",[e._v(e._s(o.ip_address))]),r("TableData",{staticClass:"flex justify-end"},[r("Button",{attrs:{disabled:e.loading,size:"sm"},on:{click:function(L){return e.syncServer(o)}}},[e._v(" "+e._s(e.__("Synchronize"))+" ")])],1)],1)}),1)],1)]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},A=[],I=k(w,C,A,!1,null,null,null,null);const Be=I.exports;export{Be as default};
