import React from 'react';
import { IntlProvider } from 'react-intl';
import DateTime from '.';
export default {
  title: 'Atoms / DateTime',
  parameters: {
    component: DateTime
  }
};
export var DateTimeStory = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      value: 1554824654
    }));
  },
  name: 'DateTime'
};
export var WithDateOnly = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      onlyDate: true,
      value: 1554824654
    }));
  },
  name: 'With date only'
};
export var WithDateTimeAsIso8601String = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      value: "1999-11-11T11:11+0100"
    }));
  },
  name: 'With date time as ISO 8601 string'
};
export var WithDateAsIso8601String = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      onlyDate: true,
      value: "1999-11-11"
    }));
  },
  name: 'With date as ISO 8601 string'
};
export var WithCustomFormattingOptions = {
  render: function render() {
    var options = {
      year: 'numeric',
      month: 'short',
      day: 'numeric',
      weekday: 'short'
    };
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      value: "1999-11-11",
      options: options
    }));
  },
  name: 'With custom formatting options'
};
export var InvalidValueStory = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      value: null
    }));
  },
  name: 'Invalid value'
};
export var UsesCustomSymbolForInvalidValue = {
  render: function render() {
    return React.createElement(IntlProvider, {
      locale: "en"
    }, React.createElement(DateTime, {
      value: null,
      invalidValue: "X"
    }));
  },
  name: 'Uses custom symbol for invalid value'
};