"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _react = _interopRequireWildcard(require("react"));
var _ = _interopRequireDefault(require(".."));
var _DatePicker = _interopRequireDefault(require("../../DatePicker"));
var _Input = _interopRequireDefault(require("../../Input"));
var _Text = _interopRequireDefault(require("../../Text"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Range/test/RangeTemplate.jsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
var Form = exports["default"] = /*#__PURE__*/function (_Component) {
  function Form() {
    (0, _classCallCheck2["default"])(this, Form);
    return _callSuper(this, Form, arguments);
  }
  (0, _inherits2["default"])(Form, _Component);
  return (0, _createClass2["default"])(Form, [{
    key: "componentDidUpdate",
    value: function componentDidUpdate(props) {
      props.onChange(function () {});
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      this.props.onChange(function () {});
    }
  }, {
    key: "getComponent",
    value: function getComponent() {
      return /*#__PURE__*/_react["default"].createElement(_["default"], {
        dataHook: this.props.dataHook,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 18,
          columnNumber: 7
        }
      }, this.props.withLabel ? /*#__PURE__*/_react["default"].createElement(_Text["default"], {
        tagName: "label",
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 20,
          columnNumber: 11
        }
      }, this.props.label) : null, this.props.rangeType.value === 'InputRange' ? /*#__PURE__*/_react["default"].createElement(_Input["default"], (0, _extends2["default"])({
        dataHook: "first-item",
        id: "first"
      }, this.props.firstInput, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 23,
          columnNumber: 11
        }
      })) : /*#__PURE__*/_react["default"].createElement(_DatePicker["default"], (0, _extends2["default"])({
        dataHook: "first-item",
        placeholderText: "From",
        id: "fromDate"
      }, this.props.firstDate, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 25,
          columnNumber: 11
        }
      })), this.props.rangeType.value === 'InputRange' ? /*#__PURE__*/_react["default"].createElement(_Input["default"], (0, _extends2["default"])({
        dataHook: "last-item",
        id: "last"
      }, this.props.lastInput, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 33,
          columnNumber: 11
        }
      })) : /*#__PURE__*/_react["default"].createElement(_DatePicker["default"], (0, _extends2["default"])({
        dataHook: "last-item",
        placeholderText: "To",
        id: "toDate"
      }, this.props.lastDate, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 35,
          columnNumber: 11
        }
      })));
    }
  }, {
    key: "render",
    value: function render() {
      return this.getComponent();
    }
  }]);
}(_react.Component);