/* main.tsx generated by @compiled/babel-plugin v0.39.1 */
import "./main.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { defineMessages, FormattedMessage } from 'react-intl-next';
import { Box } from '@atlaskit/primitives/compiled';
import SectionMessage from '@atlaskit/section-message';
import { useAutomationMenu } from '../../menu-context';
const styles = {
  messageStyling: "_195g1ejb _19pku2gc _otyrx0bf"
};
const i18n = defineMessages({
  ruleExecutionSuccessMessage: {
    id: 'automation-menu.success-state.message',
    defaultMessage: 'Your automation is in progress',
    description: 'Message that is displayed when a users automation rule has been successfully queued.'
  },
  ruleExecutionErrorMessage: {
    id: 'automation-menu.modal.error.description',
    defaultMessage: 'Oops we ran into a problem',
    description: "Description for the error section shown when rules can't be executed"
  }
});
export const AutomationModalExecutionState = () => {
  const {
    ruleExecutionState
  } = useAutomationMenu();
  if (ruleExecutionState === 'FAILURE') {
    return /*#__PURE__*/React.createElement(Box, {
      xcss: styles.messageStyling
    }, /*#__PURE__*/React.createElement(SectionMessage, {
      appearance: "error"
    }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.ruleExecutionErrorMessage)));
  } else {
    return null;
  }
};