/// import type { DrawerProps } from '../../drawer/index.js'; import type { IconProps } from '../../icon/index.js'; import type { Image } from '../../types/index.js'; export type Logo = React.ElementType; export type Logos = { sm: Logo; lg: Logo; }; export type Action = { iconName?: IconProps['name']; iconType?: IconProps['type']; onClick?: () => void; drawer?: DrawerConfig; }; export type Entity = { image?: Image; type: 'organization' | 'listing' | 'team' | 'marketplace'; id: string; name: string; url?: string; active?: boolean; onClick?: () => void; drawer?: DrawerConfig; }; export type Entities = Entity[]; /** EntityDrawers is a map of entity types to drawer configurations */ export type EntityDrawers = { [K in Entity['type']]: DrawerConfig; }; export type DrawerContentType = 'navigation' | 'entity' | 'entities' | 'add-new-entity' | 'user' | 'secondary-navigation'; /** The drawer can be configured to show different content based on the user's actions */ export type DrawerConfig = { /** Show a wider 300px drawer instead of the standard 260px */ wide?: boolean; /** Show on the right hand side of screen */ right?: boolean; header?: React.ReactNode; /** Hide the header */ hideHeader?: boolean; message?: DrawerProps['message']; /** Used when no children are present to populate the drawer */ links?: DrawerProps['links']; /** When children are not present, dynamically render the drawer based on the other settings */ children?: React.ReactNode; }; /** Navigation is a list of links that can be rendered in the header or the drawer */ export type NavigationItem = { onClick?: () => void; href?: string; name?: string; icon: IconProps['name']; iconType?: IconProps['type']; active?: boolean; drawer?: DrawerConfig; }; export type Navigation = NavigationItem[]; export type User = { id?: string; name?: string; email?: string; avatar?: Image; drawer?: DrawerConfig; };