Files

38 lines
1.3 KiB
TypeScript

import { TenantUserType } from "../enums/tenants/TenantUserType";
import { ReactNode } from "react";
import { DefaultPermission } from "../dtos/shared/DefaultPermissions";
export interface SideBarItem {
id?: string;
title: string;
path: string;
uiIdPattern?: string;
uiIdParams?: Record<string, string | number | boolean | null | undefined>;
icon?: ReactNode;
description?: string;
open?: boolean;
adminOnly?: boolean;
tenantUserTypes?: TenantUserType[];
permission?: DefaultPermission;
/** Item is visible when at least one permission is granted. */
anyPermissions?: DefaultPermission[];
items?: SideBarItem[];
/** Alternate route roots that keep a consolidated navigation entry active. */
activePaths?: string[];
/** Route roots that must NOT activate this entry (sibling entries' subroutes under a broad activePaths prefix). */
excludePaths?: string[];
/** Links shown inside the workspace area instead of permanently in the global sidebar. */
contextItems?: SideBarItem[];
side?: ReactNode;
exact?: boolean;
redirectTo?: string;
isCollapsible?: boolean;
target?: "_blank" | undefined;
disabled?: boolean;
hidden?: boolean;
isSecondary?: boolean;
isQuickLink?: boolean;
isActive?: boolean;
isExpandedByHref?: boolean;
}