import * as React from 'react'; import { UseAccordionProps } from './useAccordion'; import { ThemeInterface } from '../../theme/magma'; interface BaseAccordionProps extends UseAccordionProps, React.HTMLAttributes { /** * @children required */ children: React.ReactNode; /** * @internal */ testId?: string; /** * @internal */ theme?: ThemeInterface; } export interface AccordionMultipleProps extends BaseAccordionProps { /** * Zero-based indices of item to expanded initially. When isMulti is true this is an array of numbers. * @default [] */ defaultIndex?: number[]; /** * Not used in uncontrolled accordion */ index?: never; /** * If true, multiple accordion items may be expanded at once */ isMulti: true; } export interface AccordionSingleProps extends UseAccordionProps, React.HTMLAttributes { /** * Zero-based index of item to expanded initially. When isMulti is false this is a number. * @default null */ defaultIndex?: number; /** * Not used in uncontrolled accordion */ index?: never; /** * If true, multiple accordion items may be expanded at once */ isMulti: false; } export interface AccordionMultipleControlledProps extends UseAccordionProps, React.HTMLAttributes { /** * Zero-based indices of expanded items. When isMulti is true this is an array of numbers. * @default [] */ index?: number[]; /** * Not used in controlled accordion */ defaultIndex?: never; isMulti?: true; } export interface AccordionSingleControlledProps extends UseAccordionProps, React.HTMLAttributes { /** * Zero-based index of expanded item. When isMulti is a false this is a number. * @default null */ index?: number; /** * Not used in controlled accordion */ defaultIndex?: never; isMulti: false; } export declare type AccordionProps = AccordionMultipleProps | AccordionSingleProps | AccordionMultipleControlledProps | AccordionSingleControlledProps; export declare const Accordion: React.ForwardRefExoticComponent<(AccordionMultipleProps & React.RefAttributes) | (AccordionSingleProps & React.RefAttributes) | (AccordionMultipleControlledProps & React.RefAttributes) | (AccordionSingleControlledProps & React.RefAttributes)>; export {};