import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{Nn as n,Xn as r,Xr as i}from"./vendor-primevue-D50rA9nL.js";import{Vn as a,fn as o}from"./vendor-other-BnH5nyVX.js";import{c as s,s as c}from"./dialogService-Cr3DyAja.js";function getPermissions(e,t){return e===`personal`?{canViewOtherMembers:!1,canViewPendingInvites:!1,canInviteMembers:!1,canManageInvites:!1,canRemoveMembers:!1,canLeaveWorkspace:!1,canAccessWorkspaceMenu:!1,canManageSubscription:!0}:t===`owner`?{canViewOtherMembers:!0,canViewPendingInvites:!0,canInviteMembers:!0,canManageInvites:!0,canRemoveMembers:!0,canLeaveWorkspace:!0,canAccessWorkspaceMenu:!0,canManageSubscription:!0}:{canViewOtherMembers:!0,canViewPendingInvites:!1,canInviteMembers:!1,canManageInvites:!1,canRemoveMembers:!1,canLeaveWorkspace:!0,canAccessWorkspaceMenu:!0,canManageSubscription:!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=s(),t=i(`plan`);function setActiveTab(e){t.value=String(e)}let n=r(()=>e.activeWorkspace?.type??`personal`),a=r(()=>e.activeWorkspace?.role??`owner`),o=r(()=>getPermissions(n.value,a.value)),c=r(()=>getUIConfig(n.value,a.value));return{activeTab:r(()=>t.value),setActiveTab,permissions:o,uiConfig:c,workspaceType:n,workspaceRole:a}}var l,u=t((()=>{n(),o(),c(),l=a(useWorkspaceUIInternal)}));export{l as n,u as t};
//# sourceMappingURL=useWorkspaceUI-BMg_M5z-.js.map