import React from 'react';
import { Platform } from 'react-native';
import TimePickerAndroid from './TimePickerAndroid';
import TimePickerIOS from './TimePickerIOS';
import type { InternalTimePickerProps } from './types';

const TimePicker = (props: InternalTimePickerProps) => {
  if (Platform.OS === 'ios') {
    return <TimePickerIOS {...props} />;
  }

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

export default TimePicker;
