import {PropsWithChildren} from 'react';
import {StyleProp, ViewStyle} from 'react-native';

import {AvatarProps} from '../Avatar';
import {PillProps} from '../Pill';

export interface AccordionContextValue {
  isCollapsed: boolean;
  onToggleCollapsed: () => void;
  disabled: boolean;
}

export interface AccordionRef {
  setCollapsed: () => void;
  isCollapsed: boolean;
}

export interface AccordionProps extends PropsWithChildren {
  initialCollapsed?: boolean;
  style?: StyleProp<ViewStyle>;
  withBackground?: boolean;
  disabled?: boolean;
}

export interface AccordionHeaderProps extends PropsWithChildren {
  onPress?: () => void;
  style?: StyleProp<ViewStyle>;
}

export interface AccordionContentProps extends PropsWithChildren {
  style?: StyleProp<ViewStyle>;
}

export interface AccordionTitleProps {
  title: string;
  description?: string;
  topText?: string;
  titleNumberOfLines?: number;
  descriptionNumberOfLines?: number;
  style?: StyleProp<ViewStyle>;
}

export interface AccordionIconProps {
  style?: StyleProp<ViewStyle>;
  onPress?: () => void;
}

export interface AccordionAvatarProps extends Omit<AvatarProps, 'style'> {
  style?: StyleProp<ViewStyle>;
}

export interface AccordionPillProps extends PillProps {
  style?: StyleProp<ViewStyle>;
}
