import i from"./TopBar.8157552e.js";import s from"./Container.f87d9f62.js";import m 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 c from"./List.d5d221b1.js";import u 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 g from"./SettingsSegment.e8fdfb41.js";import y from"./Pagination.a93b6f75.js";import{u as a}from"./notification.db2f2ae7.js";import T from"./FormInput.7debc7c5.js";import k from"./Tabs.4a91c310.js";import x from"./Table.5d32c28c.js";import H from"./TableHead.1eed799b.js";import S from"./TableHeader.44bdf327.js";import B from"./TableRow.6382a60a.js";import C from"./TableBody.c78326a3.js";import P from"./TableData.c69a64ca.js";import{t as w,p as D}from"./pickBy.33496a24.js";import{n as I}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 L={metaInfo(){return{title:`${this.__("Users")}`}},layout:v,components:{TopBar:i,Container:s,Content:m,Page:n,PageHeader:p,PageHeaderTitle:_,PageBody:l,Button:f,List:c,ListItem:u,StatusBubble:d,NotificationBadge:b,SettingsLayout:h,SettingsSegment:g,Pagination:y,Tabs:k,Table:x,TableHead:H,TableHeader:S,TableRow:B,TableBody:C,TableData:P,FormInput:T},props:{users:Object,filters:Object},data(){return{form:{search:this.filters.search}}},watch:{form:{handler:w(function(){let o=D(this.form);this.$inertia.get(this.route("admin.users.index",Object.keys(o).length?o:{remember:"forget"}),{},{preserveState:!0})},500),deep:!0}},mounted(){this.$page.props.flash.success&&a({variant:"success",title:"Users",message:this.$page.props.flash.success})},methods:{useNotification:a}};var R=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.__("Users")))])]},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:"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")},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:"User list overview"}},[e("TableHead",[e("TableRow",[e("TableHeader",[t._v(t._s(t.__("Name")))]),e("TableHeader",[t._v(t._s(t.__("User name")))]),e("TableHeader",[t._v(t._s(t.__("Role")))]),e("TableHeader",[t._v(t._s(t.__("Package")))]),e("TableHeader")],1)],1),e("TableBody",t._l(t.users.data,function(r){return e("TableRow",{key:r.id},[e("TableData",[e("inertia-link",{attrs:{href:t.route("admin.users.show",r.id)}},[e("span",{staticClass:"text-primary"},[t._v(t._s(r.name))]),e("p",{staticClass:"text-medium-emphasis"},[t._v(t._s(r.email))]),e("p",{staticClass:"text-medium-emphasis"},[t._v(t._s(r.sites_count)+" "+t._s(t.__choice("site|sites",r.sites_count))+" \xB7 "+t._s(r.servers_count)+" "+t._s(t.__choice("server|servers",r.servers_count)))])])],1),e("TableData",[t._v(t._s(r.user_name))]),e("TableData",[t._v(t._s(r.role))]),e("TableData",[t._v(t._s(r.package?r.package.name:"-"))]),e("TableData",[e("inertia-link",{staticClass:"text-primary font-medium",attrs:{href:t.route("admin.users.edit",r.id)}},[t._v(" "+t._s(t.__("Edit"))+" ")])],1)],1)}),1)],1)],1),e("pagination",{attrs:{links:t.users}})]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},U=[],$=I(L,R,U,!1,null,null,null,null);const Ot=$.exports;export{Ot as default};
