text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.alertStyles = exports.getIntentColorsFromProps = void 0;
  var tslib_1 = require("tslib");
  var getIntentColorsFromProps = function (p, v) {
      if (p.danger) {
          return {
              color: v.dangerColor,
              backgroundColor: v.dangerBackgroundColor,
              borderColor: v.dangerBorderColor,
          };
      }
      if (p.info) {
          return {
              color: v.color,
              backgroundColor: v.backgroundColor,
              borderColor: v.borderColor,
          };
      }
      if (v.oof) {
          return {
              color: v.oofColor,
              backgroundColor: v.oofBackgroundColor,
              borderColor: v.oofBorderColor,
          };
      }
      if (v.urgent) {
          return {
              color: v.urgentColor,
              backgroundColor: v.urgentBackgroundColor,
              borderColor: v.urgentBorderColor,
          };
      }
      if (p.success) {
          return {
              color: v.successColor,
              backgroundColor: v.successBackgroundColor,
              borderColor: v.successBorderColor,
          };
      }
      if (p.warning) {
          return {
              color: v.warningColor,
              backgroundColor: v.warningBackgroundColor,
              borderColor: v.warningBorderColor,
          };
      }
      return {
          color: v.color,
          backgroundColor: v.backgroundColor,
          borderColor: v.borderColor,
      };
  };
  exports.getIntentColorsFromProps = getIntentColorsFromProps;
  exports.alertStyles = {
      root: function (_a) {
          var p = _a.props, v = _a.variables, siteVariables = _a.theme.siteVariables;
          return (tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ display: 'flex', alignItems: 'center', position: 'relative', borderStyle: v.borderStyle, borderWidth: v.borderWidth, borderRadius: v.borderRadius, minHeight: v.minHeight, padding: v.padding, fontWeight: v.fontWeight, visibility: 'visible', boxSizing: 'border-box' }, exports.getIntentColorsFromProps(p, v)), ((p.attached === 'top' || p.attached === true) && {
              borderRadius: v.borderRadius + " " + v.borderRadius + " 0 0",
          })), (p.attached === 'bottom' && {
              borderRadius: "0 0 " + v.borderRadius + " " + v.borderRadius,
          })), (p.fitted && { display: 'inline-flex' })), (p.dismissible && { padding: v.dismissiblePadding })), (!p.visible && {
              visibility: 'hidden',
          })));
      },
      actions: function (_a) {
          var v = _a.variables;
          return ({
              margin: v.actionsMargin,
          });
      },
      header: function (_a) {
          var v = _a.variables;
          return ({
              fontWeight: v.headerFontWeight,
              margin: v.headerMargin,
          });
      },
      body: function () { return ({
          display: 'flex',
          flexGrow: 1,
      }); },
      content: function () { return ({
          flexGrow: 1,
      }); },
      icon: function (_a) {
          var v = _a.variables;
          return ({
              display: 'inline-flex',
              alignItems: 'center',
              justifyContent: 'center',
              width: v.iconSize,
              height: v.iconSize,
              '& > :first-child': {
                  height: '100%',
                  width: '100%',
                  '& svg': {
                      height: '100%',
                      width: '100%',
                  },
              },
              margin: v.iconMargin,
          });
      },
  };
  