import"./rolldown-runtime-DIIn1E2Q.js";import{D as e}from"./vendor-vue-core-DO0afONr.js";import{B as t}from"./vendor-vueuse-DUMtJaL2.js";import{Oi as n}from"./dialogService-Cm1GEBK8.js";function getPermissions(e,t){return e===`personal`?{canViewOtherMembers:!1,canViewPendingInvites:!1,canInviteMembers:!1,canManageInvites:!1,canRemoveMembers:!1,canLeaveWorkspace:!1,canAccessWorkspaceMenu:!1,canManageSubscription:!0,canTopUp:!0}:t===`owner`?{canViewOtherMembers:!0,canViewPendingInvites:!0,canInviteMembers:!0,canManageInvites:!0,canRemoveMembers:!0,canLeaveWorkspace:!0,canAccessWorkspaceMenu:!0,canManageSubscription:!0,canTopUp:!0}:{canViewOtherMembers:!0,canViewPendingInvites:!1,canInviteMembers:!1,canManageInvites:!1,canRemoveMembers:!1,canLeaveWorkspace:!0,canAccessWorkspaceMenu:!0,canManageSubscription:!1,canTopUp:!1}}function getUIConfig(e,t){return e===`personal`?{showMembersList:!1,showPendingTab:!1,showSearch:!1,showDateColumn:!1,showRoleBadge:!1,membersGridCols:`grid-cols-1`,pendingGridCols:`grid-cols-[50%_20%_20%_10%]`,headerGridCols:`grid-cols-1`,showEditWorkspaceMenuItem:!1,workspaceMenuAction:null,workspaceMenuDisabledTooltip:null}:t===`owner`?{showMembersList:!0,showPendingTab:!0,showSearch:!0,showDateColumn:!0,showRoleBadge:!0,membersGridCols:`grid-cols-[50%_40%_10%]`,pendingGridCols:`grid-cols-[50%_20%_20%_10%]`,headerGridCols:`grid-cols-[50%_40%_10%]`,showEditWorkspaceMenuItem:!0,workspaceMenuAction:`delete`,workspaceMenuDisabledTooltip:`workspacePanel.menu.deleteWorkspaceDisabledTooltip`}:{showMembersList:!0,showPendingTab:!1,showSearch:!0,showDateColumn:!0,showRoleBadge:!0,membersGridCols:`grid-cols-[1fr_auto]`,pendingGridCols:`grid-cols-[50%_20%_20%_10%]`,headerGridCols:`grid-cols-[1fr_auto]`,showEditWorkspaceMenuItem:!1,workspaceMenuAction:`leave`,workspaceMenuDisabledTooltip:null}}function useWorkspaceUIInternal(){let t=n(),r=e(()=>t.activeWorkspace?.type??`personal`),i=e(()=>t.activeWorkspace?.role??`owner`);return{permissions:e(()=>getPermissions(r.value,i.value)),uiConfig:e(()=>getUIConfig(r.value,i.value)),workspaceType:r,workspaceRole:i}}var r=t(useWorkspaceUIInternal);export{r as t};
//# sourceMappingURL=useWorkspaceUI-CJvykg_d.js.map