function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import DocsTabsViewer from '@zohodesk/docs/es/docsviewer/DocsTabsViewer';
import Calendarview from '../Calendarview';
import CalendarviewDocConfig from './Calendarview.model.docConfig';
import componentGroups from '../../../../docs-utils/componentGroups';
import componentCategories from '../../../../docs-utils/componentCategories';
export class CalendarviewConsumer extends React.Component {
  constructor(props) {
    super(props);
    let date = new Date();
    this.state = {
      month: date.getMonth(),
      date: date.getDate(),
      year: date.getYear(),
      day: date.getDay()
    };
    this.onSelectDate = this.onSelectDate.bind(this);
  }

  onSelectDate(date) {
    this.setState({
      date: date
    });
  }

  render() {
    return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Calendarview, _extends({
      month: this.state.month,
      date: this.state.date,
      year: this.state.year,
      onSelect: this.onSelectDate
    }, this.props)));
  }

}
export default function Calendarview__Model(props) {
  return /*#__PURE__*/React.createElement(DocsTabsViewer, _extends({
    docConfig: CalendarviewDocConfig,
    componentType: CalendarviewConsumer
  }, props));
}

if (false) {
  Calendarview__Model.docs = {
    componentGroup: componentGroups.Components,
    folderName: componentCategories.UCL
  };
}