import React, { useState, useEffect } from 'react';
import classNames from 'classnames';
import PickerHeader from './picker-header';
import PickerDay from './picker-day';
var DatePicker = function (props) {
    var _a = props.prefixCls, prefixCls = _a === void 0 ? 'ty-date-picker' : _a, _b = props.defaultValue, defaultValue = _b === void 0 ? new Date() : _b, className = props.className, style = props.style;
    var cls = classNames(prefixCls, className);
    var _c = useState(props.value ? props.value : defaultValue), date = _c[0], setDate = _c[1];
    var _d = useState(new Date()), panelDate = _d[0], setPanelDate = _d[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); } })));
};
export default DatePicker;
//# sourceMappingURL=index.js.map