import type { GlobalProps, InitializedState } from '../../shared/model.js'; import type { DBAccordionItemDefaultProps } from '../accordion-item/model.js'; export declare const AccordionVariantList: readonly ["divider", "card"]; export type AccordionVariantType = (typeof AccordionVariantList)[number]; export declare const AccordionBehaviorList: readonly ["multiple", "single"]; export type AccordionBehaviorType = (typeof AccordionBehaviorList)[number]; export type DBAccordionDefaultProps = { /** * To allow multiple items open at the same time or only 1 item */ behavior?: AccordionBehaviorType; /** * The index of items which should be open when loading the accordion */ initOpenIndex?: number[]; /** * Alternative to pass in a simple representation of accordion items */ items?: DBAccordionItemDefaultProps[] | string; /** * Set details name for exclusive accordions, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#name */ name?: string; /** * Informs about the changes in the internal state, which item is open */ onChange?: (openAccordionItemIds: string[]) => void; /** * Defines the display of the accordion and the items: * "divider": with a dividing line between the items * "card": w/o dividing line, but items are shown in the card variant */ variant?: AccordionVariantType; }; export type DBAccordionProps = DBAccordionDefaultProps & GlobalProps; export type DBAccordionDefaultState = { _initOpenIndexDone: boolean; _name?: string; convertItems: () => DBAccordionItemDefaultProps[]; }; export type DBAccordionState = DBAccordionDefaultState & InitializedState;