/**
 * Configuration for collapsible behavior.
 */
export type CollapsibleConfig = {
    /** Default open state for uncontrolled usage. @default true */
    defaultIsOpen?: boolean;
    /** Controlled open state. */
    isOpen?: boolean;
    /** Callback when open state changes. */
    onOpenChange?: (isOpen: boolean) => void;
};
export interface UseCollapsibleOptions {
    /**
     * Whether the component is collapsible.
     * - `true` — self-managed, starts open
     * - `{ defaultIsOpen: false }` — self-managed, starts collapsed
     * - `{ isOpen, onOpenChange }` — controlled externally
     */
    isCollapsible?: boolean | CollapsibleConfig;
    /**
     * Unique identifier within an CollapsibleGroup.
     * When present and inside a group, defers state to the group.
     */
    value?: string;
}
export interface UseCollapsibleReturn {
    /** Whether collapsible behavior is enabled. */
    isEnabled: boolean;
    /** Whether the content is currently open/expanded. */
    isOpen: boolean;
    /** Toggle the open/closed state. */
    toggle: () => void;
}
/**
 * Hook that encapsulates collapsible state management.
 *
 * Supports three modes:
 * 1. **Group-controlled**: When inside a CollapsibleGroup with a `value`, defers to group.
 * 2. **Controlled**: When `isOpen` is provided in config, the parent owns state;
 *    `toggle` only calls `onOpenChange` and never mutates internal state.
 * 3. **Uncontrolled**: Self-managed internal state with optional `defaultIsOpen`.
 *    `onOpenChange`, if supplied, is invoked in addition to the internal update —
 *    it is a notification callback, not a signal that the component is controlled.
 *
 * @example
 * ```
 * const {isEnabled, isOpen, toggle} = useCollapsible({
 *   isCollapsible: true,
 *   value: 'section-1',
 * });
 * ```
 */
export declare function useCollapsible(options: UseCollapsibleOptions): UseCollapsibleReturn;
//# sourceMappingURL=useCollapsible.d.ts.map