import {ReactNode, ComponentType} from 'react';
import {StyleProp, ViewStyle} from 'react-native';
import {StackNavigationProp} from '@react-navigation/stack';

export interface StepperProps {
  steps: Step[];
  title?: string;
  onClose: () => void;
  defaultIndex?: number;
  children: ReactNode;
  containerStyle?: StyleProp<ViewStyle>;
  hideClose?: boolean;
}

export interface HeaderProps {
  goBack?: () => void;
  onClose?: () => void;
  title?: string;
  disabledBack?: boolean;
  RightComponent?: ComponentType;
  hideClose?: boolean;
  titleNumberOfLines?: number;
}

export interface FooterProps {
  goNext?: () => void;
  goBack?: () => void;
  disabled?: boolean;
  isLoading?: boolean;
  nextLabel?: string;
  backLabel?: string;
  stepData?: unknown;
  showBackButton?: boolean;
  showContinueButton?: boolean;
  hidden?: boolean;
  label?: string;
  containerStyle?: StyleProp<ViewStyle>;
}

export interface Step {
  id: string;
  component: ComponentType;
}

export type StepperStackParamList = {
  [key: string]: undefined;
};

export type StepperNavigationProp = StackNavigationProp<StepperStackParamList>;
