import{d as y,s as g,m as u,r as p,c as l,o as n,a as t,e as f,t as e,F as x,g as C,b as a,w as r,h as b,u as A}from"./app-Do7K7VDV.js";import{_ as B}from"./Paginate-BZTS8QtF.js";import{_ as D}from"./NoDataFound-BCWTwO3P.js";import{_ as I}from"./AdminLayout-DeT_GLTC.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const N={class:"table-responsive mt-4 w-full"},L={class:"table"},$={class:"w-1/3"},j={class:"w-1/3"},V={class:"!text-right"},E={key:0,class:"tbody"},F={class:"flex items-center gap-2"},S=["src"],T={class:"flex items-center gap-2"},U=["src"],M={key:1},O={class:"flex justify-end"},R={class:"dropdown","data-placement":"bottom-start"},W={class:"dropdown-toggle"},q={class:"dropdown-content w-56"},z={class:"dropdown-list"},G={class:"dropdown-list-item"},H={class:"dropdown-list-item"},J=["onClick"],K={class:"w-full"},P=y({layout:I}),at=Object.assign(P,{__name:"Index",props:["members"],setup(c){const{deleteRow:v}=g(),w=c,m=u(()=>w.members.data),k=u(()=>m.value.length>0);return(o,Q)=>{const i=p("Link"),d=p("Icon");return n(),l("div",N,[t("table",L,[t("thead",null,[t("tr",null,[t("th",$,e(o.trans("User")),1),t("th",j,e(o.trans("Invited By")),1),t("th",null,e(o.trans("Workspaces")),1),t("th",null,e(o.trans("Created At")),1),t("th",V,e(o.trans("Action")),1)])]),k.value?(n(),l("tbody",E,[(n(!0),l(x,null,C(m.value,s=>{var _;return n(),l("tr",{key:s.id},[t("td",null,[a(i,{href:o.route("admin.users.show",s)},{default:r(()=>[t("div",F,[t("img",{src:s.avatar,class:"mr-3 h-8 w-8 rounded-full",alt:"User Avatar"},null,8,S),t("div",null,[t("b",null,e(s.name),1),t("p",null,e(s.email),1)])])]),_:2},1032,["href"])]),t("td",null,[s.invited_by?(n(),f(i,{key:0,href:o.route("admin.users.show",s.invited_by)},{default:r(()=>[t("div",T,[t("img",{src:s.invited_by.avatar,class:"mr-3 h-8 w-8 rounded-full",alt:"Inviter Avatar"},null,8,U),t("div",null,[t("b",null,e(s.invited_by.name),1),t("p",null,e(s.invited_by.email),1)])])]),_:2},1032,["href"])):(n(),l("span",M,"N/A"))]),t("td",null,e(((_=s.assigned_workspaces)==null?void 0:_.map(h=>h.name).join(", "))||"N/A"),1),t("td",null,e(new Date(s.created_at).toLocaleDateString()),1),t("td",null,[t("div",O,[t("div",R,[t("div",W,[a(d,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),t("div",q,[t("ul",z,[t("li",G,[a(i,{class:"dropdown-link",href:o.route("admin.logs.members.edit",s)},{default:r(()=>[a(d,{class:"h-5 text-3xl text-slate-400",icon:"bx:edit"}),b(" "+e(o.trans("Edit")),1)]),_:2},1032,["href"])]),t("li",H,[t("button",{type:"button",class:"dropdown-link",onClick:h=>A(v)(o.route("admin.logs.members.destroy",s))},[a(d,{class:"h-5 text-3xl text-slate-400",icon:"bx:trash"}),b(" "+e(o.trans("Delete")),1)],8,J)])])])])])])])}),128))])):(n(),f(D,{key:1,forTable:!0}))]),t("div",K,[a(B,{links:c.members.links},null,8,["links"])])])}}});export{at as default};
