import { type DataTestId, type MaskingProps, type StylingProps, type WithChildren } from '@dynatrace/strato-components/core'; import { type MultiExpanded, type SingleExpanded } from './accordion-state.js'; /** @public */ export interface AccordionOwnProps extends WithChildren, StylingProps, DataTestId, MaskingProps { /** * Determines whether multiple sections can be open at the same time. * @defaultValue false */ multiple?: Multiple; /** * The position of the trigger that expands and collapses a section. * @defaultValue 'end' */ triggerPosition?: 'start' | 'end'; /** * Callback fired when a section is expanded/collapsed. */ onExpandChange?: (value: OnChangeValue) => void; /** * If the accordion is interactive, the whole header is interactive and can open or close the accordion. * Otherwise, only the button is interactive * @defaultValue true */ interactive?: boolean; /** * The color of the accordion. * Setting the color affects the button, label, content and divider color. * @defaultValue 'neutral' */ color?: 'neutral' | 'primary' | 'success' | 'warning' | 'critical'; /** * The size of the accordion. * @defaultValue 'default' */ size?: 'default' | 'condensed'; /** * Whether a divider is shown between the sections. * @defaultValue true */ showDividers?: boolean; } /** @public */ export interface AccordionUncontrolledProps { /** * Determines which sections are initially expanded in an uncontrolled scenario. * @defaultValue false */ defaultExpanded?: Multiple extends true ? MultiExpanded : SingleExpanded; /** * Determines which sections expanded in a controlled scenario. */ expanded?: never; } /** @public */ export interface AccordionControlledProps { /** * Determines which sections are initially expanded in an uncontrolled scenario. */ defaultExpanded?: never; /** * Determines which sections are expanded in a controlled scenario. */ expanded: Multiple extends true ? MultiExpanded : SingleExpanded; } /** @public */ export type AccordionProps = AccordionOwnProps & (AccordionControlledProps | AccordionUncontrolledProps); /** @public */ export type OnChangeValue = Multiple extends true ? MultiExpanded : SingleExpanded; /** * The `Accordion` component can be used to group information, reveal and hide content. * @public */ export declare const Accordion: ((props: AccordionProps & import("react").RefAttributes) => React.ReactElement | null) & { Section: (props: import("./AccordionSection.js").AccordionSectionProps) => import("react").ReactElement | null; SectionLabel: (props: WithChildren & StylingProps & DataTestId & import("react").RefAttributes) => React.ReactElement | null; SectionContent: (props: WithChildren & StylingProps & DataTestId & import("react").RefAttributes) => React.ReactElement | null; };