import { CactusTheme } from '@repay/cactus-theme'; import PropTypes from 'prop-types'; import React, { ReactElement } from 'react'; import { StyledComponentBase } from 'styled-components'; import { MarginProps, MaxWidthProps, WidthProps } from 'styled-system'; import { FlexItemProps } from '../helpers/flexItem'; export declare type AccordionVariants = 'simple' | 'outline'; interface AccordionProps extends MarginProps, MaxWidthProps, WidthProps, FlexItemProps, React.HTMLAttributes { /** Does not apply when Accordion descends from a controlled Provider. If true, the * Accordion will begin in the open state when first rendered. */ defaultOpen?: boolean; variant?: AccordionVariants; useBoxShadows?: boolean; } interface AccordionHeaderProps extends React.HTMLAttributes { render?: (opts: { isOpen: boolean; headerId: string; }) => JSX.Element; } interface AccordionBodyProps extends MarginProps, React.HTMLAttributes { } interface AccordionProviderProps { /** Only used in uncontrolled variant. Determines maximum number of Accordions that * can be open at one time. */ maxOpen?: number; /** Only used in controlled variant. Contains the IDs of all Accordions that should be * in an open state. */ openId?: string | string[]; /** Called whenever an Accordion is toggled from open to closed or vice versa. The ID * of the toggled Accordion is passed to the function. */ onChange?: (changedId: string) => void; children?: React.ReactNode; } export declare const AccordionHeader: import("styled-components").StyledComponent<(props: AccordionHeaderProps) => ReactElement, import("styled-components").DefaultTheme, {}, never>; export declare const AccordionBody: import("styled-components").StyledComponent<(props: AccordionBodyProps) => ReactElement | null, import("styled-components").DefaultTheme, {}, never>; export declare const AccordionProvider: { (props: AccordionProviderProps): ReactElement; propTypes: { maxOpen: (props: AccordionProviderProps, name: keyof AccordionProviderProps, compName: string) => Error | null; onChange: PropTypes.Requireable<(...args: any[]) => any>; openId: (props: AccordionProviderProps, name: keyof AccordionProviderProps, compName: string) => Error | null; }; }; interface AccordionComponent extends StyledComponentBase<'div', CactusTheme, AccordionProps> { Header: React.ComponentType; Body: React.ComponentType; Provider: React.ComponentType; } export declare const Accordion: any; declare const _default: AccordionComponent; export default _default;