import { type ReactNode } from 'react' import type { DirectoryData, DirectoryProps, NavbarItem, } from '../Directory/types' import type { MerchantInfo, LeftPanelInfo, TenantBadge, } from '../shared/layoutTypes' // Re-exported for backward compatibility: these types were previously declared // here and are part of the public API via `Sidebar/index.ts` (`export * from './types'`). export type { LeftPanelInfo, LeftPanelItem, TenantBadge, } from '../shared/layoutTypes' export type TenantItem = { label: string value?: string icon: ReactNode showInPanel?: boolean badge?: TenantBadge } export type SidebarMerchantInfo = { items: Array<{ label: string value: string icon?: ReactNode }> selected: string onSelect: (value: string) => void } export type SidebarStateChangeType = 'collapsed' | 'expanded' | 'intermediate' export type SidebarProps = { showLeftPanel?: boolean children: ReactNode data: DirectoryData[] | null leftPanel?: LeftPanelInfo topbar: ReactNode footer?: ReactNode sidebarTopSlot?: ReactNode sidebarCollapseKey?: string merchantInfo?: MerchantInfo rightActions?: ReactNode enableTopbarAutoHide?: boolean isTopbarVisible?: boolean onTopbarVisibilityChange?: (isVisible: boolean) => void defaultIsTopbarVisible?: boolean isExpanded?: boolean onExpandedChange?: (isExpanded: boolean) => void onSidebarStateChange?: (state: SidebarStateChangeType) => void defaultIsExpanded?: boolean panelOnlyMode?: boolean disableIntermediateState?: boolean iconOnlyMode?: boolean hideOnIconOnlyToggle?: boolean showPrimaryActionButton?: boolean primaryActionButtonProps?: Omit< React.ButtonHTMLAttributes, 'type' > activeItem?: string | null onActiveItemChange?: (item: string | null) => void defaultActiveItem?: string | null onHoveringChange?: (isHovering: boolean) => void showHierarchyLines?: DirectoryProps['showHierarchyLines'] hierarchyLineBorderRadius?: DirectoryProps['hierarchyLineBorderRadius'] expandedItems?: DirectoryProps['expandedItems'] defaultExpandedItems?: DirectoryProps['defaultExpandedItems'] onExpandedItemsChange?: DirectoryProps['onExpandedItemsChange'] onItemExpand?: DirectoryProps['onItemExpand'] enableVirtualization?: DirectoryProps['enableVirtualization'] virtualization?: DirectoryProps['virtualization'] } export type MobileNavigationItem = NavbarItem & { sectionLabel?: string } export type SidebarMobileNavigationProps = { items: MobileNavigationItem[] onHeightChange?: (height: string) => void showPrimaryActionButton?: boolean primaryActionButtonProps?: Omit< React.ButtonHTMLAttributes, 'type' > }