var _jsxFileName = 'src/datePicker/components/dateRange.jsx';
/**
 * dateRange.jsx
 *
 * @Author: apple
 * @Date: 2018/6/29 11:16
 */

import React from 'react';
import Tooltip from '../../tooltip';
import Separator from '../separator';
import PropTypes from 'prop-types';

function DateRange(props) {
    var prefixClsDatePicker = props.prefixClsDatePicker,
        dateRangeStyle = props.dateRangeStyle,
        prefixCls = props.prefixCls,
        beginTimeValue = props.beginTimeValue,
        inputProps = props.inputProps,
        inputClass = props.inputClass,
        clearBtn = props.clearBtn,
        beginDtItemDiffProps = props.beginDtItemDiffProps,
        renderDtItem = props.renderDtItem,
        separator = props.separator,
        endTimeValue = props.endTimeValue,
        endDtItemDiffProps = props.endDtItemDiffProps,
        renderInput = props.renderInput,
        handleActive = props.handleActive,
        _autoTest_isOpen = props._autoTest_isOpen;

    var readyRenderInput = renderInput();
    var readyRenderDtItem = renderDtItem();
    return React.createElement(
        'div',
        { className: prefixClsDatePicker, style: dateRangeStyle, __source: {
                fileName: _jsxFileName,
                lineNumber: 34
            },
            __self: this
        },
        React.createElement(
            Tooltip,
            {
                position: 'bottomLeft',
                trigger: 'click',
                className: 'dt-item',
                autoAdjustPosition: true,
                isOpen: _autoTest_isOpen,
                content: React.createElement(
                    'div',
                    {
                        className: prefixCls + '-datePicker-input-item',
                        onMouseEnter: function onMouseEnter() {
                            return handleActive(true, 'beginActive');
                        },
                        onMouseLeave: function onMouseLeave() {
                            return handleActive(false, 'beginActive');
                        },
                        'data-type': 'begin-input', __source: {
                            fileName: _jsxFileName,
                            lineNumber: 42
                        },
                        __self: this
                    },
                    readyRenderInput({
                        defaultValue: beginTimeValue,
                        inputProps: inputProps[0],
                        className: inputClass
                    }),
                    clearBtn('begin')
                ), __source: {
                    fileName: _jsxFileName,
                    lineNumber: 35
                },
                __self: this
            },
            readyRenderDtItem(beginDtItemDiffProps)
        ),
        React.createElement(Separator, { prefixClsDatePicker: prefixClsDatePicker, separator: separator, __source: {
                fileName: _jsxFileName,
                lineNumber: 57
            },
            __self: this
        }),
        React.createElement(
            Tooltip,
            {
                position: 'bottomRight',
                trigger: 'click',
                className: 'dt-item',
                autoAdjustPosition: true,
                isOpen: _autoTest_isOpen,
                content: React.createElement(
                    'div',
                    {
                        className: prefixCls + '-datePicker-input-item',
                        onMouseEnter: function onMouseEnter() {
                            return handleActive(true, 'endActive');
                        },
                        onMouseLeave: function onMouseLeave() {
                            return handleActive(false, 'endActive');
                        },
                        'data-type': 'end-input', __source: {
                            fileName: _jsxFileName,
                            lineNumber: 65
                        },
                        __self: this
                    },
                    readyRenderInput({
                        defaultValue: endTimeValue,
                        inputProps: inputProps[1],
                        className: inputClass
                    }),
                    clearBtn('end')
                ), __source: {
                    fileName: _jsxFileName,
                    lineNumber: 58
                },
                __self: this
            },
            readyRenderDtItem(endDtItemDiffProps)
        )
    );
}
Date.propTypes = {
    prefixClsDatePicker: PropTypes.string,
    onlyTimeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]),
    beginTimeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]),
    endTimeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]),
    inputProps: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
    inputClass: PropTypes.string,
    clearBtn: PropTypes.func,
    beginDisableExquisiteTimeRules: PropTypes.object,
    endDisableExquisiteTimeRules: PropTypes.object,
    type: PropTypes.string,
    renderDtItem: PropTypes.func,
    renderInput: PropTypes.func,
    onActive: PropTypes.bool,
    beginDtItemDiffProps: PropTypes.object,
    endDtItemDiffProps: PropTypes.object
};

export default DateRange;