import type { HTMLAttributes, ReactNode } from "react"; import { cn } from "./cn"; import { Icon } from "./Icon"; export interface ApplicationShellProps extends Omit, "content"> { header: ReactNode; stage: ReactNode; navigation?: ReactNode; content?: ReactNode; navigationOpen?: boolean; contentOpen?: boolean; contentExpanded?: boolean; } export function ApplicationShell({ header, stage, navigation, content, navigationOpen = false, contentOpen = false, contentExpanded = false, className, ...props }: ApplicationShellProps) { return (
{header}
{stage}
{navigationOpen && navigation ?
{navigation}
: null} {contentOpen && content ?
{content}
: null}
); } export interface ApplicationPanelProps extends Omit, "title"> { eyebrow?: ReactNode; title: ReactNode; description?: ReactNode; expanded?: boolean; expandLabel?: string; closeLabel?: string; onExpandedChange?: (expanded: boolean) => void; onClose: () => void; children: ReactNode; } export function ApplicationPanel({ eyebrow, title, description, expanded = false, expandLabel = "Развернуть окно", closeLabel = "Закрыть окно", onExpandedChange, onClose, children, className, ...props }: ApplicationPanelProps) { return (
{eyebrow ? {eyebrow} : null}

{title}

{description ?

{description}

: null}
{onExpandedChange ? ( ) : null}
{children}
); }