import i from"./TopBar.8157552e.js";import m from"./Container.f87d9f62.js";import s from"./Content.e22a1fd6.js";import n from"./Page.3927bdbf.js";import p from"./PageHeader.a5f457a5.js";import _ from"./PageHeaderTitle.3ed783af.js";import l from"./PageBody.dec1fae1.js";import f from"./Button.f17dffc9.js";import u from"./List.d5d221b1.js";import c from"./ListItem.ee1e88fb.js";import d from"./StatusBubble.4f1d8322.js";import b from"./NotificationBadge.b6fae3d5.js";import v from"./MainLayout.17290af6.js";import h from"./SettingsLayout.3305573b.js";import T from"./SettingsSegment.e8fdfb41.js";import y from"./Pagination.a93b6f75.js";import{u as g}from"./notification.db2f2ae7.js";import S from"./FormInput.7debc7c5.js";import x from"./Table.5d32c28c.js";import k from"./TableHead.1eed799b.js";import H from"./TableHeader.44bdf327.js";import P from"./TableRow.6382a60a.js";import B from"./TableBody.c78326a3.js";import C from"./TableData.c69a64ca.js";import w from"./IconPhp.bf31d2c3.js";import{t as D,p as I}from"./pickBy.33496a24.js";import{n as L}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";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./ErrorText.b141a597.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";const R={layout:v,metaInfo(){return{title:`${this.__("Servers")}`}},components:{TopBar:i,Container:m,Content:s,Page:n,PageHeader:p,PageHeaderTitle:_,PageBody:l,Button:f,List:u,ListItem:c,StatusBubble:d,NotificationBadge:b,SettingsLayout:h,SettingsSegment:T,Pagination:y,Table:x,TableHead:k,TableHeader:H,TableRow:P,TableBody:B,TableData:C,IconPhp:w,FormInput:S},props:{servers:Object,filters:Object},mounted(){},methods:{useNotification:g},data(){return{form:{search:this.filters.search}}},watch:{form:{handler:D(function(){let o=I(this.form);this.$inertia.get(this.route("admin.servers.index",Object.keys(o).length?o:{remember:"forget"}),{},{preserveScroll:!0,preserveState:!0})},500),deep:!0}}};var j=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(t._s(t.__("Servers")))])]},proxy:!0}])}),e("PageBody",[e("SettingsLayout",{attrs:{"main-col-span":"col-span-4"},scopedSlots:t._u([{key:"segments",fn:function(){return[e("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Servers")))]},proxy:!0},{key:"form",fn:function(){return[e("form",{staticClass:"space-y-4 pb-5 mb-5 border-b border-low-emphasis"},[e("FormInput",{attrs:{label:t.__("Search"),placeholder:t.__("Search on server name, or the name/email of the owner of the server")},model:{value:t.form.search,callback:function(r){t.$set(t.form,"search",r)},expression:"form.search"}})],1)]},proxy:!0},{key:"content",fn:function(){return[e("div",[e("Table",{attrs:{caption:"Server list overview"}},[e("TableHead",[e("TableRow",[e("TableHeader",[t._v(t._s(t.__("Name")))]),e("TableHeader",[t._v(t._s(t.__("IP")))]),e("TableHeader",[t._v(t._s(t.__("Users")))]),e("TableHeader",[t._v(t._s(t.__("Max sites")))]),e("TableHeader",[t._v(t._s(t.__("Date")))]),e("TableHeader")],1)],1),e("TableBody",t._l(t.servers.data,function(r){return e("TableRow",{key:r.id},[e("TableData",[e("div",[t._v(t._s(r.name))])]),e("TableData",[t._v(" "+t._s(r.ip)+" ")]),e("TableData",{staticClass:"space-x-2"},[!r.users||!r.users.length?e("span",[t._v("-")]):t._l(r.users,function(a){return e("inertia-link",{key:a.id,staticClass:"text-primary",attrs:{href:t.route("admin.users.show",a.id)}},[t._v(t._s(a.name))])})],2),e("TableData",[t._v(" "+t._s(r.maximum_sites)+" ("+t._s(t.__("Current"))+": "+t._s(r.sites_count)+") ")]),e("TableData",[t._v(" "+t._s(r.created_at)+" ")]),e("TableData",[e("inertia-link",{staticClass:"text-primary font-medium",attrs:{href:t.route("admin.services.servers.edit",r.id)}},[t._v(" "+t._s(t.__("Edit"))+" ")])],1)],1)}),1)],1)],1),e("pagination",{attrs:{links:t.servers}})]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},F=[],N=L(R,j,F,!1,null,null,null,null);const Ot=N.exports;export{Ot as default};
