"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.defaultProps=exports.propTypes=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")),_getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")),_assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")),_inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_react=_interopRequireWildcard(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_Button=_interopRequireDefault(require("../button/Button")),propTypes={onSubmit:_propTypes.default.oneOfType([_propTypes.default.bool,_propTypes.default.func]),onCancel:_propTypes.default.oneOfType([_propTypes.default.bool,_propTypes.default.func])};exports.propTypes=propTypes;var defaultProps={onSubmit:null,onCancel:null};exports.defaultProps=defaultProps;var _ref=_react.default.createElement("span",null),_ref2=_react.default.createElement("span",null),DatePickerFooter=function(e){function o(){var e,r;(0,_classCallCheck2.default)(this,o);for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];return r=(0,_possibleConstructorReturn2.default)(this,(e=(0,_getPrototypeOf3.default)(o)).call.apply(e,[this].concat(a))),(0,_defineProperty2.default)((0,_assertThisInitialized2.default)(r),"onSubmitHandler",function(){var e=r.props.onSubmit;e&&e()}),(0,_defineProperty2.default)((0,_assertThisInitialized2.default)(r),"onCancelHandler",function(){var e=r.props.onCancel;e&&e()}),r}return(0,_inherits2.default)(o,e),(0,_createClass2.default)(o,[{key:"render",value:function(){var e=this.props,r=e.onSubmit,t=e.onCancel;return r||t?_react.default.createElement("div",{className:"dnb-date-picker__footer"},r&&_react.default.createElement(_Button.default,{text:"Ok",variant:"secondary",onClick:this.onSubmitHandler})||_ref,t&&_react.default.createElement(_Button.default,{text:"Cancel",icon:"close",icon_position:"left",variant:"tertiary",onClick:this.onCancelHandler})||_ref2):_react.default.createElement(_react.default.Fragment,null)}}]),o}(_react.PureComponent);exports.default=DatePickerFooter,(0,_defineProperty2.default)(DatePickerFooter,"defaultProps",defaultProps),DatePickerFooter.propTypes="production"!==process.env.NODE_ENV?propTypes:{};
//# sourceMappingURL=DatePickerFooter.js.map
