import{d,J as u,b,q as f,y as r,H as y}from"./registerWidgets.4cc86716.js";import{a as _}from"./asyncComputed.f9d446a7.js";import"./gateway.6112d0c1.js";import{M as s}from"./member.60c494cc.js";import{C as g}from"./CrudView.58195497.js";import"./passwordlessManager.d432fb48.js";import"./activeRecord.57c6bf02.js";import"./DropdownMenu.e399150c.js";import"./CircularLoading.249aa989.js";import"./Modal.7d907bdb.js";const v=d({__name:"Members",setup(x){const o=y().params.organizationId,m=[{key:"email",label:"Email"}],i=async e=>{await s.create(o,e.email),c()},{loading:n,result:l,refetch:c}=_(()=>s.list(o)),p=u(()=>{var e,t;return{columns:[{name:"Email"},{name:"Role"}],rows:(t=(e=l.value)==null?void 0:e.map(a=>({key:a.email,cells:[{text:a.email,classes:["title","centered"]},{text:a.role,classes:["centered"]}]})))!=null?t:[]}});return(e,t)=>(b(),f(g,{"entity-name":"members",loading:r(n),title:"Organization members",description:"List all organization members.","empty-title":"No members yet",table:r(p),"create-button-text":"Add members",fields:m,onCreate:i},null,8,["loading","table"]))}});export{v as default};
//# sourceMappingURL=Members.f7260bf4.js.map
