import React from 'react';
import { Platform } from 'react-native';
import IOSDatePickerDialog from './Dialog/IOSDialog';
import AndroidDatePickerDialog from './Dialog/AndroidDialog';
import type { DatePickerDialogProps } from './Dialog/type';

const Dialog = ({ ...props }: DatePickerDialogProps) => {
  if (Platform.OS === 'ios') {
    return <IOSDatePickerDialog {...props} />;
  }

  return <AndroidDatePickerDialog {...props} />;
};

export default Dialog;
