var _tests$SIMPLE_EXAMPLE;

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; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { Unstable_Calendar as Calendar, Unstable_StatefulCalendar as StatefulCalendar, Unstable_StatefulDatepicker as StatefulDatepicker } from './index.js';
import { addDays } from './utils/index.js';
import tests from './examples-list.js';
export var suite = 'Component Test Suite';
export default (_tests$SIMPLE_EXAMPLE = {}, _defineProperty(_tests$SIMPLE_EXAMPLE, tests.SIMPLE_EXAMPLE, function Story1() {
  return React.createElement(Calendar, null);
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_EXAMPLE, function Story2() {
  return React.createElement(StatefulCalendar, null);
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_IN_POPOVER, function Story3() {
  return React.createElement("div", null, React.createElement(StatefulDatepicker, null), React.createElement("br", null), React.createElement(StatefulDatepicker, null));
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_RANGE_IN_POPOVER, function Story3() {
  return React.createElement("div", null, React.createElement(StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: []
    }
  }), React.createElement("div", {
    style: {
      marginTop: '150px'
    }
  }), React.createElement(StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: []
    }
  }));
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_RANGE_QUICK_SELECT, function QuickSelect() {
  return React.createElement(StatefulCalendar, {
    isRange: true,
    enableQuickSelect: true
  });
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_DATEPICKER_QUICK_SELECT, function QuickSelect() {
  return React.createElement(StatefulDatepicker, {
    isRange: true,
    initialState: {
      value: [new Date(), addDays(new Date(), 3)]
    },
    enableQuickSelect: true
  });
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.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(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);