"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.suite = void 0;

var React = _interopRequireWildcard(require("react"));

var _index = require("./index.js");

var _index2 = require("./utils/index.js");

var _examplesList = _interopRequireDefault(require("./examples-list.js"));

var _tests$SIMPLE_EXAMPLE;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var suite = 'Component Test Suite';
exports.suite = suite;

var _default = (_tests$SIMPLE_EXAMPLE = {}, _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.SIMPLE_EXAMPLE, function Story1() {
  return React.createElement(_index.Unstable_Calendar, null);
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.STATEFUL_EXAMPLE, function Story2() {
  return React.createElement(_index.Unstable_StatefulCalendar, null);
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.STATEFUL_IN_POPOVER, function Story3() {
  return React.createElement("div", null, React.createElement(_index.Unstable_StatefulDatepicker, null), React.createElement("br", null), React.createElement(_index.Unstable_StatefulDatepicker, null));
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.STATEFUL_RANGE_IN_POPOVER, function Story3() {
  return React.createElement("div", null, React.createElement(_index.Unstable_StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: []
    }
  }), React.createElement("div", {
    style: {
      marginTop: '150px'
    }
  }), React.createElement(_index.Unstable_StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: []
    }
  }));
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.STATEFUL_RANGE_QUICK_SELECT, function QuickSelect() {
  return React.createElement(_index.Unstable_StatefulCalendar, {
    isRange: true,
    enableQuickSelect: true
  });
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.STATEFUL_DATEPICKER_QUICK_SELECT, function QuickSelect() {
  return React.createElement(_index.Unstable_StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: [new Date(), (0, _index2.addDays)(new Date(), 3)]
    },
    enableQuickSelect: true
  });
}), _defineProperty(_tests$SIMPLE_EXAMPLE, _examplesList.default.WITH_OVERRIDES, function Story3() {
  var selectOverrides = {
    ControlContainer: {
      style: function style(_ref) {
        var $theme = _ref.$theme,
            $isFocused = _ref.$isFocused,
            $isPseudoFocused = _ref.$isPseudoFocused;
        return {
          backgroundColor: $isFocused || $isPseudoFocused ? $theme.colors.positive500 : $theme.colors.positive
        };
      }
    },
    OptionContent: {
      style: function style(_ref2) {
        var $theme = _ref2.$theme,
            $isHighlighted = _ref2.$isHighlighted;
        return {
          color: $isHighlighted ? $theme.colors.positive : $theme.colors.foreground
        };
      }
    }
  };

  var arrowBtnOverrides = function arrowBtnOverrides(_ref3) {
    var $theme = _ref3.$theme;
    return {
      ':focus': {
        backgroundColor: $theme.colors.positive500,
        borderRadius: $theme.borders.useRoundedCorners ? $theme.sizing.scale100 : 0
      }
    };
  };

  return React.createElement(_index.Unstable_StatefulCalendar, {
    initialState: {
      value: new Date()
    },
    overrides: {
      CalendarHeader: {
        style: function style(_ref4) {
          var $theme = _ref4.$theme;
          return {
            backgroundColor: $theme.colors.positive
          };
        }
      },
      MonthSelect: {
        props: {
          overrides: selectOverrides
        }
      },
      YearSelect: {
        props: {
          overrides: selectOverrides
        }
      },
      PrevButton: {
        style: arrowBtnOverrides
      },
      NextButton: {
        style: arrowBtnOverrides
      },
      Day: {
        style: function style(_ref5) {
          var $theme = _ref5.$theme,
              $selected = _ref5.$selected,
              $isHovered = _ref5.$isHovered,
              $isHighlighted = _ref5.$isHighlighted;
          return {
            backgroundColor: $selected ? $theme.colors.positive : $isHovered || $isHighlighted ? $theme.colors.positive100 : 'transparent'
          };
        }
      }
    }
  });
}), _tests$SIMPLE_EXAMPLE);

exports.default = _default;