import { ComponentProps } from 'react'; import { default as default_2 } from 'react'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { Icon } from '@phosphor-icons/react'; import * as React_2 from 'react'; declare type AccountDropdownActionItem = { type?: 'action'; id: string; label: string; icon?: React_2.ReactNode; onClick: () => void; /** Second line (e.g. "ID: xyz"); copy button shown when copyValue is set. */ secondaryLabel?: React_2.ReactNode; copyValue?: string; onCopy?: (value: string) => void; /** Keyboard shortcut hint (e.g. "⌘K") shown on the right. */ shortcut?: string; }; declare type AccountDropdownItem = AccountDropdownActionItem | AccountDropdownSubmenuItem; declare interface AccountDropdownProps extends React_2.ComponentPropsWithoutRef { accountPhoto: string; accountName: string; /** Pass a flat array for a single group, or an array of arrays for multiple groups separated by dividers. */ accountDropdownItems: AccountDropdownItem[] | AccountDropdownItem[][]; teams: AccountDropdownTeam[]; /** Side the dropdown opens on relative to the trigger. Defaults to 'bottom'. */ side?: React_2.ComponentPropsWithoutRef['side']; /** Alignment of the dropdown relative to the trigger. Defaults to 'end'. */ align?: React_2.ComponentPropsWithoutRef['align']; isSuperAdmin?: boolean; } /** Sub-option with a required `value`, used in radio-mode submenus. */ declare type AccountDropdownRadioSubOption = Omit & { value: string; }; declare type AccountDropdownSubmenuBase = { type: 'submenu'; id: string; label: string; icon?: React_2.ReactNode; /** Second line on the submenu trigger (e.g. "ID: xyz"); copy button when copyValue is set. */ secondaryLabel?: React_2.ReactNode; copyValue?: string; onCopy?: (value: string) => void; }; declare type AccountDropdownSubmenuItem = AccountDropdownSubmenuBase & ({ /** The currently selected value. When provided with onValueChange, renders items as a radio group with selection indicators. */ value: string; onValueChange: (value: string) => void; items: AccountDropdownRadioSubOption[]; } | { value?: never; onValueChange?: never; items: AccountDropdownSubOption[]; }); declare type AccountDropdownSubOption = { id: string; label: string; icon?: React_2.ReactNode; /** Required for radio mode. */ value?: string; /** Used in plain (non-radio) mode. */ onClick?: () => void; /** Keyboard shortcut hint (e.g. "⌘K") shown on the right. */ shortcut?: string; }; declare type AccountDropdownTeam = { id: string; name: string; isCurrent: boolean; logoUrl?: string; }; declare interface ArticleNavItem extends Omit { status?: 'discovery' | 'unpublished' | 'draft'; hasChildren?: boolean; isLoadingChildren?: boolean; items?: ArticleNavItem[]; } declare function Body_2({ children }: { children?: default_2.ReactNode; }): default_2.JSX.Element; declare namespace Body_2 { var displayName: string; } declare namespace Compounds { export { MainArea, Body_2 as Body, Header, LeftSidebar, Main, RightSidebar } } declare const DropdownMenu: React_2.FC; declare const DropdownMenuContent: React_2.ForwardRefExoticComponent, "ref"> & React_2.RefAttributes>; declare type FeatureFlags = { [key: string]: boolean | string | number; }; export declare const FullLayout: FullLayoutCompound; declare type FullLayoutCompound = typeof FullLayoutWithFlags & { MainArea: typeof Compounds.MainArea; Body: typeof Compounds.Body; Header: typeof Compounds.Header; LeftSidebar: typeof Compounds.LeftSidebar; Main: typeof Compounds.Main; RightSidebar: typeof Compounds.RightSidebar; }; export declare interface FullLayoutContextValue { isSideNavOpen: boolean; isRightSidebarOpen: boolean; toggleSidebar: () => void; openRightSidebar: () => void; closeRightSidebar: () => void; toggleRightSidebar: () => void; showSidenav: () => void; disableLeftSideNav: boolean; leftNavWidth: number; isMobile: boolean; sideNavRef: default_2.RefObject; rightSidebarRef: default_2.RefObject; sidebarToggleRef: default_2.RefObject; handleResizeStart: (e: default_2.MouseEvent) => void; handleResizeKeyDown: (e: default_2.KeyboardEvent) => void; ariaValuenow: number; ariaValuemin: number; ariaValuemax: number; /** Mirrors `FullLayout` prop; `FullLayout.Main` uses it for viewport height when Radix ScrollArea is off. */ disableMainScrollArea: boolean; } export declare const FullLayoutHeader: default_2.ForwardRefExoticComponent>; export declare interface FullLayoutHeaderProps extends default_2.ComponentPropsWithoutRef<'header'> { onOpenLeft?: () => void; onOpenRight?: () => void; } export declare const FullLayoutLeftSidebar: default_2.ForwardRefExoticComponent>; export declare interface FullLayoutLeftSidebarProps extends Omit, 'children'> { open: boolean; widthPx: number; onResizeStart: (e: default_2.MouseEvent) => void; onResizeKeyDown: (e: default_2.KeyboardEvent) => void; ariaValuenow: number; ariaValuemin: number; ariaValuemax: number; sidebarProps: ComponentProps; } /** Nav state derived from route (e.g. active ids). Provided by Platform; when null, layout uses props only. */ export declare interface FullLayoutNavState { appNavActiveId?: string; sectionNavActiveId?: string; activeArticleId?: string; } export declare const FullLayoutNavStateContext: default_2.Context; export declare interface FullLayoutProps extends FullLayoutRootProps { /** Feature flags for layout/header (e.g. platform.brainfish-native.enabled). Passed through to FeatureFlagProvider. */ featureFlags?: FeatureFlags; } export declare function FullLayoutProvider({ value, children }: FullLayoutProviderProps): default_2.JSX.Element; declare interface FullLayoutProviderProps { value: FullLayoutContextValue; children: default_2.ReactNode; } export declare const FullLayoutRightSidebar: default_2.ForwardRefExoticComponent>; export declare interface FullLayoutRightSidebarProps extends Omit, 'children'> { open: boolean; children: default_2.ReactNode; scrollable?: boolean; } export declare interface FullLayoutRootProps { children?: default_2.ReactNode; disableLeftSideNav?: boolean; /** When true, main column uses a plain div (no Radix ScrollArea); viewport height is applied on `FullLayout.Main`. */ disableMainScrollArea?: boolean; className?: string; /** When true, the right sidebar is always open and cannot be toggled. */ forceRightSidebarOpen?: boolean; } declare function FullLayoutWithFlags(props: FullLayoutProps): default_2.JSX.Element; declare function Header(props: ComponentProps): default_2.JSX.Element | null; declare namespace Header { var displayName: string; } declare const HeaderNav: React_2.ForwardRefExoticComponent>; declare interface HeaderNavProps extends React_2.ComponentPropsWithoutRef<'header'>, Omit { isSideNavOpen?: boolean; onSideNavigationToggle: () => void; onHelpClick: () => void; onBrainfishNativeClick: () => void; onLogoNav: () => void; isHomePath?: boolean; showSuggestionAction?: boolean; suggestionAction?: React_2.ReactNode; onSuggestionActionClick?: () => void; showSidebarToggle?: boolean; isSuperAdmin?: boolean; isViewer?: boolean; /** Ref for the sidebar toggle button; used by layout to move focus here when sidebar is collapsed. */ sidebarToggleRef?: React_2.Ref; } declare type ItemLinkComponent = React_2.ComponentType & { 'data-sidebar-item-id'?: string; 'data-sidebar-item-type'?: 'app' | 'article' | 'section'; }>; declare function LeftSidebar(props: ComponentProps): default_2.JSX.Element | null; declare namespace LeftSidebar { var displayName: string; } declare function Main({ children, className }: { children?: default_2.ReactNode; className?: string; }): default_2.JSX.Element; declare namespace Main { var displayName: string; } declare function MainArea({ children }: { children?: default_2.ReactNode; }): default_2.JSX.Element; declare namespace MainArea { var displayName: string; } declare function RightSidebar({ children, scrollable }: { children?: default_2.ReactNode; scrollable?: boolean; }): default_2.JSX.Element | null; declare namespace RightSidebar { var displayName: string; } declare const Sidebar: React_2.ForwardRefExoticComponent>; declare interface SidebarContextProps { collapsed: boolean; ItemLinkComponent: ItemLinkComponent; activeArticleId?: string; onSelectArticle?: (id: string) => void; onExpandArticle?: (id: string) => void; onSearchArticles?: (value: string) => void; onAddArticle?: (parentId: string | null) => Promise; onMoreActions?: (articleId: string) => void; canMoveArticle?: (move: { id: string; parentId: string | null; index: number; }) => boolean; onMoveArticle?: (moved: { id: string; parentId: string | null; index: number; }) => void | Promise; } declare interface SidebarNavItem { id: string; label: string; href: string; Icon?: Icon; items?: SidebarNavItem[]; } declare interface SidebarProps extends React_2.ComponentPropsWithoutRef<'aside'>, SidebarContextProps { showAppBack?: boolean; onAppBack?: () => void; appNavItems?: SidebarNavItem[]; appNavActiveId?: string; showArticles?: boolean; isLoadingArticles?: boolean; articles?: ArticleNavItem[]; sectionNavItems?: SidebarNavItem[]; sectionNavActiveId?: string; } export declare function useFullLayoutContext(): FullLayoutContextValue | null; /** * Convenience hook for programmatically controlling the right sidebar. * * Must be used inside a `` tree. * * @example * ```tsx * function MyComponent() { * const rightSidebar = useRightSidebar(); * return ; * } * ``` */ export declare function useRightSidebar(): UseRightSidebarReturn; export declare interface UseRightSidebarReturn { /** Whether the right sidebar is currently open. */ isOpen: boolean; /** Open the right sidebar (no-op if already open). */ open: () => void; /** Close the right sidebar (no-op if already closed). */ close: () => void; /** Toggle the right sidebar open/closed. */ toggle: () => void; } export { }