import{d,J as u,b,q as f,y as r,H as y}from"./registerWidgets.04dc761e.js";import{a as _}from"./asyncComputed.e0f43af3.js";import"./gateway.743ef31c.js";import{M as s}from"./member.37325430.js";import{C as g}from"./CrudView.babb7bf0.js";import"./passwordlessManager.271a8058.js";import"./activeRecord.57c6bf02.js";import"./DropdownMenu.d347b089.js";import"./CircularLoading.78e37a70.js";import"./Modal.02341c49.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.a44648f6.js.map
