/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import ErrorIcon from '@atlaskit/icon/core/migration/status-error--error';
import { Box, Inline } from '@atlaskit/primitives/compiled';
import MotionWrapper from '../../../common/motion-wrapper';
var styles = {
  containerStyles: "_kkk2n7od _2rko12b0 _1rjc12x7 _18zru2gc _19pku2gc _2hwxu2gc _otyrze3t _18u0u2gc _1bsb1osq _fiawglyw",
  errorContentStyles: "_bozgv77o",
  titleStyles: "_11c8dcr7 _syazazsu"
};
var getIcon = function getIcon(appearance) {
  switch (appearance) {
    case 'error':
      return /*#__PURE__*/React.createElement(ErrorIcon, {
        color: "var(--ds-icon-danger, #C9372C)",
        spacing: "compact",
        label: "Error",
        LEGACY_size: "small",
        testId: "action-error-icon",
        LEGACY_margin: "0 ".concat("var(--ds-space-negative-025, -2px)"),
        size: "small"
      });
    default:
      return null;
  }
};
export var ActionFooter = function ActionFooter(_ref) {
  var message = _ref.message,
    testId = _ref.testId;
  if (!message) {
    return null;
  }
  return /*#__PURE__*/React.createElement(Box, {
    backgroundColor: message.appearance === 'error' ? 'color.background.danger' : undefined,
    testId: "".concat(testId, "-footer"),
    style: {
      width: "calc(100% - var(--container-padding-left) - var(--container-padding-right))"
    },
    xcss: styles.containerStyles
  }, /*#__PURE__*/React.createElement(MotionWrapper, {
    isFadeIn: true,
    show: true,
    showTransition: true
  }, /*#__PURE__*/React.createElement(Inline, {
    alignBlock: "start",
    grow: "fill",
    space: "space.075",
    xcss: styles.errorContentStyles
  }, message.icon || getIcon(message.appearance), /*#__PURE__*/React.createElement(Box, {
    xcss: styles.titleStyles
  }, message.title))));
};