"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.OnCloseProp = exports.DifferentVariants = exports.DefaultUsage = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = _interopRequireDefault(require("."));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = exports.default = {
  title: 'Molecules / InfoBar',
  parameters: {
    component: _.default
  }
};
var StyledBg = _styledComponents.default.div.withConfig({
  displayName: "InfoBarstories__StyledBg",
  componentId: "sc-1ah3c7t-0"
})(["background:#f5f5f5;"]);
var DefaultUsage = exports.DefaultUsage = {
  render: function render() {
    return _react.default.createElement(StyledBg, null, _react.default.createElement(_.default, null, "InfoBar should be used on top of the pages to show Marketing or Customer Support communication messages. Content of the InfoBar is just rendered ", _react.default.createElement("code", null, "children")));
  },
  name: 'Default usage'
};
var OnCloseProp = exports.OnCloseProp = {
  render: function render() {
    return _react.default.createElement(StyledBg, null, _react.default.createElement(_.default, null, "Without onClose prop InfoBar cannot be dismissed"), _react.default.createElement("br", null), _react.default.createElement("br", null), _react.default.createElement("br", null), _react.default.createElement(_.default, {
      onClose: function onClose() {
        return alert('close');
      }
    }, "With onClose prop InfoBar can be dismissed, but ParentComponent is in charge to react and actually hide the InfoBar."));
  },
  name: 'onClose prop demo'
};
var variants = [{
  variant: 'general',
  children: _react.default.createElement(_react.default.Fragment, null, "We\u2019re currently working on the new main menu. Links marked with arrow icon will redirect you to the previous website experience. ", _react.default.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'warning',
  children: _react.default.createElement(_react.default.Fragment, null, "We\u2019re currently working on the new main menu. Links marked with arrow icon will redirect you to the previous website experience. ", _react.default.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'error',
  children: _react.default.createElement(_react.default.Fragment, null, "The US market is currently down, we are fixing it right now. It will soon be back and running. ", _react.default.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'success',
  children: _react.default.createElement(_react.default.Fragment, null, "We have fixed the US market issue. It is now back to service. ", _react.default.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}];
var DifferentVariants = exports.DifferentVariants = {
  render: function render() {
    return _react.default.createElement(StyledBg, null, _react.default.createElement("code", null, "no variant passed, defaults to general"), _react.default.createElement("br", null), _react.default.createElement(_.default, null, variants[0].children), _react.default.createElement("br", null), _react.default.createElement("br", null), variants === null || variants === void 0 ? void 0 : variants.map(function (_ref) {
      var variant = _ref.variant,
        children = _ref.children;
      return _react.default.createElement(_react.default.Fragment, {
        key: variant
      }, _react.default.createElement("code", null, "variant=", variant), _react.default.createElement("br", null), _react.default.createElement(_.default, {
        variant: variant
      }, children), _react.default.createElement("br", null), _react.default.createElement("br", null));
    }));
  },
  name: 'Different variants'
};