import React from 'react';
import styled from 'styled-components';
import InfoBar from '.';
export default {
  title: 'Molecules / InfoBar',
  parameters: {
    component: InfoBar
  }
};
var StyledBg = styled.div.withConfig({
  displayName: "InfoBarstories__StyledBg",
  componentId: "sc-1ah3c7t-0"
})(["background:#f5f5f5;"]);
export var DefaultUsage = {
  render: function render() {
    return React.createElement(StyledBg, null, React.createElement(InfoBar, 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.createElement("code", null, "children")));
  },
  name: 'Default usage'
};
export var OnCloseProp = {
  render: function render() {
    return React.createElement(StyledBg, null, React.createElement(InfoBar, null, "Without onClose prop InfoBar cannot be dismissed"), React.createElement("br", null), React.createElement("br", null), React.createElement("br", null), React.createElement(InfoBar, {
      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.createElement(React.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.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'warning',
  children: React.createElement(React.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.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'error',
  children: React.createElement(React.Fragment, null, "The US market is currently down, we are fixing it right now. It will soon be back and running. ", React.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}, {
  variant: 'success',
  children: React.createElement(React.Fragment, null, "We have fixed the US market issue. It is now back to service. ", React.createElement("a", {
    href: "/nonce"
  }, "Read more"))
}];
export var DifferentVariants = {
  render: function render() {
    return React.createElement(StyledBg, null, React.createElement("code", null, "no variant passed, defaults to general"), React.createElement("br", null), React.createElement(InfoBar, null, variants[0].children), React.createElement("br", null), React.createElement("br", null), variants === null || variants === void 0 ? void 0 : variants.map(function (_ref) {
      var variant = _ref.variant,
        children = _ref.children;
      return React.createElement(React.Fragment, {
        key: variant
      }, React.createElement("code", null, "variant=", variant), React.createElement("br", null), React.createElement(InfoBar, {
        variant: variant
      }, children), React.createElement("br", null), React.createElement("br", null));
    }));
  },
  name: 'Different variants'
};