import{d as b,ez as u,H as f,b as y,c as g,u as _}from"./outputWidgets.d5738148.js";import{a as w}from"./asyncComputed.5b25749a.js";import"./router.6dfa30a6.js";import{M as m}from"./member.46a8f135.js";import"./columns.0cf76977.js";import{C as I}from"./CrudView.1762d1c1.js";import"./Title.69748959.js";import"./index.f7210413.js";import"./gateway.243c7c9e.js";import"./activeRecord.bb15dfc5.js";import"./pubsub.601f5d35.js";import"./index.f4ac7424.js";import"./icons.fc57d5d6.js";import"./index.a6d8d08b.js";import"./Form.45dee1c8.js";import"./url.d1f492ee.js";import"./index.faad752e.js";import"./index.f9a2f10c.js";import"./index.2791d1cb.js";import"./index.3bddf189.js";import"./index.ffe76733.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="bbea0a89-f7c7-4c8b-bd6f-db78ba28ce2a",e._sentryDebugIdIdentifier="sentry-dbid-bbea0a89-f7c7-4c8b-bd6f-db78ba28ce2a")}catch{}})();const J=b({__name:"Members",setup(e){const a=u().params.organizationId,n=[{key:"email",label:"Email"}],s=async t=>{await m.create(a,t.email),p()},{loading:l,result:d,refetch:p}=w(()=>m.list(a)),c=f(()=>{var t,r;return{columns:[{name:"Email"},{name:"Role"}],rows:(r=(t=d.value)==null?void 0:t.map(i=>({key:i.email,cells:[{text:i.email},{text:i.role}]})))!=null?r:[]}});return(t,r)=>(y(),g(I,{"entity-name":"members",loading:_(l),title:"Organization members",description:"List all organization members.","empty-title":"No members yet",table:c.value,"create-button-text":"Add members",fields:n,onCreate:s},null,8,["loading","table"]))}});export{J as default};
//# sourceMappingURL=Members.91f6c5d5.js.map
