import _extends from"babel-runtime/helpers/extends";import*as React from"react";import*as ReactDOM from"react-dom";import createReactClass from"create-react-class";import*as PropTypes from"prop-types";import toFragment from"rc-util/es/Children/mapSelf";import cx from"classnames";import TodayButton from"../calendar/TodayButton";import OkButton from"../calendar/OkButton";import TimePickerButton from"../calendar/TimePickerButton";var CalendarFooter=createReactClass({displayName:"CalendarFooter",propTypes:{prefixCls:PropTypes.string,showDateInput:PropTypes.bool,disabledTime:PropTypes.any,timePicker:PropTypes.element,selectedValue:PropTypes.any,showOk:PropTypes.bool,onSelect:PropTypes.func,value:PropTypes.object,renderFooter:PropTypes.func,defaultValue:PropTypes.object},onSelect:function(e){this.props.onSelect(e)},getRootDOMNode:function(){return ReactDOM.findDOMNode(this)},render:function(){var e=this.props,t=e.value,o=e.prefixCls,r=e.showOk,a=e.timePicker,n=null,s=(0,e.renderFooter)();if(e.showToday||a||s){var p=void 0,c=void 0;e.showToday&&(c=React.createElement(TodayButton,_extends({},e,{value:t})));var i=void 0;(!0===r||!1!==r&&e.timePicker)&&(i=React.createElement(OkButton,e));var m=void 0;e.timePicker&&(m=React.createElement(TimePickerButton,e));var l=void 0;(c||m||i)&&(l=React.createElement("span",{className:o+"-footer-btn"},toFragment([c,m,i])));var d=cx(((p={})[o+"-footer"]=!0,p[o+"-footer-show-ok"]=i,p));n=React.createElement("div",{className:d},s,l)}return n}});export default CalendarFooter;