import * as React from 'react'; import type { IComponent, IComponentStyles, IHTMLSlot, ISlottableProps, IStyleableComponentProps } from '@fluentui/foundation-legacy'; import type { IBaseProps, IRefObject } from '../../Utilities'; import type { ICollapsibleSectionTitleSlot } from './CollapsibleSectionTitle.types'; export type ICollapsibleSectionComponent = IComponent; export type ICollapsibleSectionTokenReturnType = ReturnType>; export type ICollapsibleSectionStylesReturnType = ReturnType>; export interface ICollapsibleSectionSlots { root?: IHTMLSlot; title?: ICollapsibleSectionTitleSlot; body?: IHTMLSlot; } export interface ICollapsibleSection { } export interface ICollapsibleSectionProps extends ISlottableProps, IStyleableComponentProps, IBaseProps { /** * Default and initial collapsed state if collapsed prop is not provided. * @default true */ defaultCollapsed?: boolean; /** * Collapsed state. If provided, component is controlled. * @default defaultCollapsed */ collapsed?: boolean; indent?: number; } export interface ICollapsibleSectionViewProps extends ICollapsibleSectionProps { /** * Optional callback to access the Title element interface. Use this instead of ref for accessing * the public methods and properties of the component. */ titleElementRef?: IRefObject; /** * Toggle input callback triggered by mouse and keyboard input. */ onClick?: (ev: React.MouseEvent) => void; /** * Key down callback for root element of CollapsibleSection. */ onRootKeyDown?: (ev: React.KeyboardEvent) => void; /** * Key down callback for CollapsibleSection title. */ onKeyDown?: (ev: React.KeyboardEvent) => void; } export interface ICollapsibleSectionTokens { } export type ICollapsibleSectionStyles = IComponentStyles;