import { type ComponentPropsWithoutRef, type ReactNode } from 'react'; /** * Props for the Disclosure component */ export type DisclosureProps = { /** * The content to be rendered inside the Disclosure component */ children: ReactNode; /** * Whether the disclosure is open by default * * @default false */ isOpenByDefault?: boolean; /** * Enable auto unmounting of the target content when it's not displayed. * When true, the target content will return null instead of hiding via CSS. * * @default true */ enableAutoUnmount?: boolean; /** * Additional class name for the root element */ className?: string; }; /** * Props for the Disclosure.Trigger component */ export type DisclosureTriggerProps = { /** * The ID of the target element that this trigger controls */ targetId: string; /** * Additional class name for the trigger element */ className?: string; /** * The content to be rendered inside the trigger */ children: string; } & ComponentPropsWithoutRef<'button'>; /** * Props for the Disclosure.Target component */ export type DisclosureTargetProps = { /** * The ID of this target element */ id: string; /** * Additional class name for the target element */ className?: string; /** * The content to be rendered inside the target */ children: ReactNode; } & ComponentPropsWithoutRef<'div'>;