import { ComponentProps, FC, RefObject } from 'react'; import { PolymorphicPropsWithRef } from '../../utilities/polymorphism/polymorphism.js'; export type ExpandablePanelContentComponent = FC & {}>; export type ExpandablePanelProps = PolymorphicPropsWithRef void; }>; export type ExpandablePanelComponent = { Content: ExpandablePanelContentComponent; Header: ExpanderComponent; } & ((props: ExpandablePanelProps) => React.ReactElement | null); export type ExpanderProps = PolymorphicPropsWithRef; type Expander = (props: ExpanderProps) => React.ReactElement | null; export type ExpanderComponent = Expander & { displayName?: string; }; export type ExpandableContext = { open: boolean; onToggle: () => void; onTransitionStart: (isOpening: boolean, ref: RefObject) => void; onTransitionEnd: (isOpen: boolean, ref: RefObject) => void; setExpanderHeight: (height: number) => void; }; export {};