import * as React from 'react';

export interface SelectableAccordionItemCommonProps {
  /** A title of the item */
  title?: React.ReactNode;
  /** An optional second row of the header */
  subtitle?: React.ReactNode;
  /** A content of the item */
  content?: React.ReactNode;
  /** Is item disabled */
  disabled?: boolean;
  onClick?(e: Event, { open }: { open: boolean }): void;
}

export interface SelectableAccordionItemProps extends SelectableAccordionItemCommonProps {
  /** A type can be ether radio, checkbox, or toggle, which will effect the way an accordion item is selected
   * @default 'toggle'
   */
  type?: 'radio' | 'checkbox' | 'toggle';
  /** A flag that indicates a open state */
  open?: boolean;
  /** A callback which is invoked every time the selection of the item is changed */
  onChange?(e: Event, idx: number, open: boolean): void;
}

export default class SelectableAccordionItem extends React.Component<SelectableAccordionItemProps> {}
