import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import React from 'react';
import { MAX_DATE, MAX_MONTH, MAX_YEAR, MIN_DATE, MIN_MONTH, MIN_YEAR } from "../../../lib/date/constants";
import { InternalDate } from "../../../lib/date/InternalDate";
import { InternalDateValidateCheck } from "../../../lib/date/types";
import { Checkbox } from "../../Checkbox";
import { Gapped } from "../../Gapped";
export var ViewDateInputValidateChecks = /*#__PURE__*/function (_React$Component) {
  function ViewDateInputValidateChecks() {
    return _React$Component.apply(this, arguments) || this;
  }
  _inheritsLoose(ViewDateInputValidateChecks, _React$Component);
  var _proto = ViewDateInputValidateChecks.prototype;
  _proto.render = function render() {
    var internalDate = new InternalDate();
    internalDate.parseInternalValue(this.props.value);
    internalDate.setRangeStart(this.props.minDate ? new InternalDate().parseInternalValue(this.props.minDate) : null);
    internalDate.setRangeEnd(this.props.maxDate ? new InternalDate().parseInternalValue(this.props.maxDate) : null);
    return /*#__PURE__*/(
      React.createElement(Gapped, {
        gap: 10,
        vertical: true
      }, /*#__PURE__*/
      React.createElement("h3", null, "\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438"), /*#__PURE__*/
      React.createElement(Checkbox, {
        disabled: true,
        checked: internalDate.validate({
          checks: [InternalDateValidateCheck.NotNull]
        })
      }, "\u2B63 ", /*#__PURE__*/
      React.createElement("code", {
        style: {
          color: 'black'
        }
      }, "NotNull"), /*#__PURE__*/
      React.createElement("div", null, "\u0412\u0441\u0435 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B \u0434\u0430\u0442\u044B \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u044B (\u043D\u0435 \u0440\u0430\u0432\u043D\u044B", ' ', /*#__PURE__*/
      React.createElement("b", null, /*#__PURE__*/
      React.createElement("code", null, "null")), ")")), /*#__PURE__*/
      React.createElement(Checkbox, {
        disabled: true,
        checked: internalDate.validate({
          checks: [InternalDateValidateCheck.Limits]
        })
      }, "\u2B63 ", /*#__PURE__*/
      React.createElement("code", {
        style: {
          color: 'black'
        }
      }, "Limits"), /*#__PURE__*/
      React.createElement("div", null, "\u041A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B \u0434\u0430\u0442\u044B \u043D\u0435 \u0432\u044B\u0445\u043E\u0434\u044F\u0442 \u0437\u0430 \u0440\u0430\u043C\u043A\u0438 \u043F\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u043B\u0438\u043C\u0438\u0442\u043E\u0432", /*#__PURE__*/

      React.createElement("br", null), "\u0413\u043E\u0434: ", MIN_YEAR, " - ", MAX_YEAR, /*#__PURE__*/
      React.createElement("br", null), "\u041C\u0435\u0441\u044F\u0446: ", MIN_MONTH, " - ", MAX_MONTH, /*#__PURE__*/
      React.createElement("br", null), "\u0427\u0438\u0441\u043B\u043E: ", MIN_DATE, " - ", MAX_DATE)), /*#__PURE__*/
      React.createElement(Checkbox, {
        disabled: true,
        checked: internalDate.validate({
          checks: [InternalDateValidateCheck.Native]
        })
      }, "\u2B63 ", /*#__PURE__*/
      React.createElement("code", {
        style: {
          color: 'black'
        }
      }, "Native"), /*#__PURE__*/
      React.createElement("div", null, "\u0418\u0437 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u043E\u0432 \u0434\u0430\u0442\u044B \u043C\u043E\u0436\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u0430\u043B\u0438\u0434\u043D\u044B\u0439 \u044D\u043A\u0437\u0435\u043C\u043F\u043B\u044F\u0440 \u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u0430 ", /*#__PURE__*/
      React.createElement("code", null, "Date()"))), /*#__PURE__*/
      React.createElement(Checkbox, {
        disabled: true,
        checked: internalDate.validate({
          checks: [InternalDateValidateCheck.Range]
        })
      }, "\u2B73 ", /*#__PURE__*/
      React.createElement("code", {
        style: {
          color: 'black'
        }
      }, "Range"), /*#__PURE__*/
      React.createElement("div", null, "\u0414\u0430\u0442\u0430 \u043D\u0435 \u0432\u044B\u0445\u043E\u0434\u0438\u0442 \u0437\u0430 \u043F\u0440\u0435\u0434\u0435\u043B\u044B \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432 ", /*#__PURE__*/
      React.createElement("code", null, "minDate/maxDate"))))
    );
  };
  return ViewDateInputValidateChecks;
}(React.Component);