import{_ as w}from"./Paginate-BZTS8QtF.js";import{_ as k}from"./NoDataFound-BCWTwO3P.js";import{d as g,s as v,r as h,c as l,o as n,a as t,e as y,t as s,F as C,g as M,b as a,w as _,h as i,u as p}from"./app-Do7K7VDV.js";import{_ as N}from"./AdminLayout-DeT_GLTC.js";import{h as x}from"./moment-BAtM24Ew.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const B={class:"table-responsive mt-4 w-full"},D={class:"table"},$={class:"!text-right"},j={key:0,class:"tbody"},A={class:"truncate whitespace-nowrap"},I={class:"flex justify-end"},L={class:"dropdown","data-placement":"bottom-start"},V={class:"dropdown-toggle"},F={class:"dropdown-content w-56"},O={class:"dropdown-list"},T={class:"dropdown-list-item"},E=["onClick"],R={class:"w-full"},S=g({layout:N}),W=Object.assign(S,{__name:"Index",props:["workspaces"],setup(r){const{deleteRow:f}=v();return(e,Y)=>{const c=h("Link"),m=h("Icon");return n(),l("div",B,[t("table",D,[t("thead",null,[t("tr",null,[t("th",null,s(e.trans("Name")),1),t("th",null,s(e.trans("Description")),1),t("th",null,s(e.trans("Modules")),1),t("th",null,s(e.trans("Members")),1),t("th",null,s(e.trans("Owner")),1),t("th",null,s(e.trans("Create At")),1),t("th",$,s(e.trans("Action")),1)])]),r.workspaces.data.length?(n(),l("tbody",j,[(n(!0),l(C,null,M(r.workspaces.data,(o,b)=>{var u;return n(),l("tr",{key:b},[t("td",null,s(o.name),1),t("td",null,s(o.description||"N/A"),1),t("td",null,[t("p",A,s((u=o.modules)==null?void 0:u.join(", ")),1)]),t("td",null,[a(c,{href:e.route("admin.logs.members.index",{workspace_id:o.id})},{default:_(()=>[i(s(o.members_count??0)+" "+s(e.trans("Members")),1)]),_:2},1032,["href"])]),t("td",null,[a(c,{href:e.route("admin.users.show",o.owner)},{default:_(()=>{var d;return[i(s((d=o.owner)==null?void 0:d.name),1)]}),_:2},1032,["href"])]),t("td",null,s(p(x)(o.created_at).format("D-MMM-Y")),1),t("td",null,[t("div",I,[t("div",L,[t("div",V,[a(m,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),t("div",F,[t("ul",O,[t("li",T,[t("a",{class:"dropdown-link",onClick:d=>p(f)(e.route("admin.logs.workspaces.destroy",o))},[a(m,{class:"h-5 text-3xl text-slate-400",icon:"bx:trash"}),i(" "+s(e.trans("Delete")),1)],8,E)])])])])])])])}),128))])):(n(),y(k,{key:1,forTable:!0}))]),t("div",R,[a(w,{links:r.workspaces.links},null,8,["links"])])])}}});export{W as default};
