"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.WithDateTimeAsIso8601String = exports.WithDateOnly = exports.WithDateAsIso8601String = exports.WithCustomFormattingOptions = exports.UsesCustomSymbolForInvalidValue = exports.InvalidValueStory = exports.DateTimeStory = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _ = _interopRequireDefault(require("."));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = exports.default = {
  title: 'Atoms / DateTime',
  parameters: {
    component: _.default
  }
};
var DateTimeStory = exports.DateTimeStory = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      value: 1554824654
    }));
  },
  name: 'DateTime'
};
var WithDateOnly = exports.WithDateOnly = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      onlyDate: true,
      value: 1554824654
    }));
  },
  name: 'With date only'
};
var WithDateTimeAsIso8601String = exports.WithDateTimeAsIso8601String = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      value: "1999-11-11T11:11+0100"
    }));
  },
  name: 'With date time as ISO 8601 string'
};
var WithDateAsIso8601String = exports.WithDateAsIso8601String = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      onlyDate: true,
      value: "1999-11-11"
    }));
  },
  name: 'With date as ISO 8601 string'
};
var WithCustomFormattingOptions = exports.WithCustomFormattingOptions = {
  render: function render() {
    var options = {
      year: 'numeric',
      month: 'short',
      day: 'numeric',
      weekday: 'short'
    };
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      value: "1999-11-11",
      options: options
    }));
  },
  name: 'With custom formatting options'
};
var InvalidValueStory = exports.InvalidValueStory = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      value: null
    }));
  },
  name: 'Invalid value'
};
var UsesCustomSymbolForInvalidValue = exports.UsesCustomSymbolForInvalidValue = {
  render: function render() {
    return _react.default.createElement(_reactIntl.IntlProvider, {
      locale: "en"
    }, _react.default.createElement(_.default, {
      value: null,
      invalidValue: "X"
    }));
  },
  name: 'Uses custom symbol for invalid value'
};