import n from"./TopBar.8157552e.js";import s 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 d from"./ListItem.ee1e88fb.js";import _ from"./StatusBubble.4f1d8322.js";import y from"./NotificationBadge.b6fae3d5.js";import g from"./MainLayout.17290af6.js";import h from"./SettingsLayout.3305573b.js";import b from"./SettingsSegment.e8fdfb41.js";import v from"./Pagination.a93b6f75.js";import{u as i}from"./notification.db2f2ae7.js";import T from"./Tabs.de9dab32.js";import S from"./Table.5d32c28c.js";import x from"./TableHead.1eed799b.js";import B from"./TableHeader.44bdf327.js";import z from"./TableRow.6382a60a.js";import k from"./TableBody.c78326a3.js";import w from"./TableData.c69a64ca.js";import{n as H}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 P={layout:g,components:{TopBar:n,Container:s,Content:a,Page:m,PageHeader:l,PageHeaderTitle:p,PageBody:f,Button:c,List:u,ListItem:d,StatusBubble:_,NotificationBadge:y,SettingsLayout:h,SettingsSegment:b,Pagination:v,Tabs:T,Table:S,TableHead:x,TableHeader:B,TableRow:z,TableBody:k,TableData:w},props:{availableSites:Array},data(){return{loading:!1}},methods:{useNotification:i,syncSite(o){this.loading=!0,window.axios.post(this.route("admin.services.sites.sync"),o).then(()=>{this.loading=!1,i({variant:"success",title:"Sites",message:`Site ${o.domain} has been synchronized to this system`})}).catch(t=>{this.loading=!1})},syncAll(){this.loading=!0,window.axios.post(this.route("admin.services.sites.sync.all")).then(()=>{this.loading=!1,i({variant:"success",title:"Sites",message:"All sites have been synchronized to this system"})}).catch(o=>{this.loading=!1})}}};var C=function(){var t=this,e=t._self._c;return e("Page",[e("TopBar"),e("Content",[e("Container",[e("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[e("PageHeaderTitle",[t._v("Synchronize sites")])]},proxy:!0}])}),e("PageBody",[e("SettingsLayout",{scopedSlots:t._u([{key:"nav",fn:function(){return[e("Tabs")]},proxy:!0},{key:"segments",fn:function(){return[e("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Overview")))]},proxy:!0},{key:"subtitle",fn:function(){return[t._v(t._s(t.__("You can synchronize your sites here. It is safe to synchronize already existing sites.")))]},proxy:!0},{key:"content",fn:function(){return[e("Button",{attrs:{size:"sm",disabled:t.loading},on:{click:t.syncAll}},[t._v(" "+t._s(t.__("Synchronize all sites"))+" ")]),e("Table",{attrs:{caption:"Available sites overview"}},[e("TableHead",[e("TableRow",[e("TableHeader",[t._v(t._s(t.__("Domain")))]),e("TableHeader")],1)],1),e("TableBody",t._l(t.availableSites,function(r){return e("TableRow",{key:r.id},[e("TableData",[t._v(t._s(r.domain))]),e("TableData",{staticClass:"flex justify-end"},[e("Button",{attrs:{disabled:t.loading,size:"sm"},on:{click:function(D){return t.syncSite(r)}}},[t._v(" "+t._s(t.__("Synchronize"))+" ")])],1)],1)}),1)],1)]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},A=[],L=H(P,C,A,!1,null,null,null,null);const kt=L.exports;export{kt as default};
