import React, { useState, useEffect } from 'react';
import classnames from 'classnames';
import PickerHeader from './picker-header';
import PickerDay from './picker-day';
var defaultProps = {
    prefixCls: 'ty-date-picker',
    defaultValue: new Date(),
};
var DatePicker = function (props) {
    var prefixCls = props.prefixCls, className = props.className, style = props.style;
    var cls = classnames(prefixCls, className);
    var _a = useState(props.value ? props.value : props.defaultValue), date = _a[0], setDate = _a[1];
    var _b = useState(new Date()), panelDate = _b[0], setPanelDate = _b[1];
    useEffect(function () {
    });
    return (React.createElement("div", { className: cls, style: style },
        React.createElement(PickerHeader, { date: panelDate, onChange: function (val) { return setPanelDate(val); } }),
        React.createElement(PickerDay, { date: date, onChange: function (val) { return setDate(val); }, panelDate: panelDate, panelOnChange: function (val) { return setPanelDate(val); } })));
};
DatePicker.defaultProps = defaultProps;
export default DatePicker;
//# sourceMappingURL=index.js.map