import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{D as t}from"./vendor-vue-core-CvBSzfTV.js";import{P as n}from"./vendor-vueuse-CDBWCrgq.js";import{Xn as r}from"./dialogService-Dp405gae.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 e=r(),n=t(()=>e.activeWorkspace?.type??`personal`),i=t(()=>e.activeWorkspace?.role??`owner`);return{permissions:t(()=>getPermissions(n.value,i.value)),uiConfig:t(()=>getUIConfig(n.value,i.value)),workspaceType:n,workspaceRole:i}}const i=n(useWorkspaceUIInternal);export{i as t};
//# sourceMappingURL=useWorkspaceUI-CmlcDVs0.js.map