'use strict';

var iconsReact = require('@cloudtower/icons-react');
var index$1 = require('../Icon/index.js');
var index = require('../Typo/index.js');
var cs = require('classnames');
var React = require('react');
var banner_style = require('./banner.style.js');
var index$2 = require('../../coreX/Show/index.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var cs__default = /*#__PURE__*/_interopDefault(cs);
var React__default = /*#__PURE__*/_interopDefault(React);

const Banner = ({ message, type, btnProps }) => {
  return /* @__PURE__ */ React__default.default.createElement("div", { id: "global-banner" }, /* @__PURE__ */ React__default.default.createElement(
    "div",
    {
      className: cs__default.default(index.Typo.Label.l3_bold, banner_style.BasicBanner, {
        [banner_style.ErrorBanner]: type === "error",
        [banner_style.InfoBanner]: type === "info",
        [banner_style.WarningBanner]: type === "warning"
      })
    },
    /* @__PURE__ */ React__default.default.createElement(index$1, { src: iconsReact.InfoICircleFill16OntintIcon }),
    /* @__PURE__ */ React__default.default.createElement("span", null, message),
    /* @__PURE__ */ React__default.default.createElement(index$2.Show, { condition: !(btnProps == null ? void 0 : btnProps.hide) }, /* @__PURE__ */ React__default.default.createElement("span", { className: "dashed-btn", onClick: btnProps == null ? void 0 : btnProps.onClick }, btnProps == null ? void 0 : btnProps.text))
  ));
};

exports.Banner = Banner;
