import * as React from 'react';
import Input from '../../../components/Input';
import { useAdaptable } from '../../AdaptableContext';
import AdaptableDateInput from '../AdaptableDateInput';
const AdaptableInput = React.forwardRef((props, ref) => {
    const useNativeInputDate = useAdaptable().adaptableOptions.userInterfaceOptions?.dateInputOptions?.useNativeInput;
    const { showClearButton, ...inputProps } = props;
    if (props.type === 'date' && !useNativeInputDate) {
        // use AdapTable date input
        return (React.createElement(AdaptableDateInput, { showClearButton: showClearButton, ...inputProps, ref: ref }));
    }
    else {
        // native input
        return React.createElement(Input, { ...inputProps, ref: ref });
    }
});
export default AdaptableInput;
