import React from 'react';
import { FormattedMessage } from 'react-intl';
import { di } from 'react-magnetic-di';
import RovoIcon from '@atlaskit/icon-lab/core/rovo';
import { Box, Inline } from '@atlaskit/primitives/compiled';
import Tooltip from '@atlaskit/tooltip';
import { messages } from '../../../../../../messages';
import useAISummaryAction from '../../../../../../state/hooks/use-ai-summary-action';
import { InfoIcon } from '../icons/info';
export const AIFooterMetadata = ({
  testId,
  url
}) => {
  const {
    state: {
      status
    }
  } = useAISummaryAction(url);
  if (status !== 'done') {
    return null;
  }
  return /*#__PURE__*/React.createElement(Inline, {
    space: "space.100",
    testId: testId,
    alignInline: "end",
    grow: "fill"
  }, /*#__PURE__*/React.createElement(Tooltip, {
    content: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summarized_info_short),
    position: "bottom"
  }, tooltipProps => /*#__PURE__*/React.createElement(Box, tooltipProps, /*#__PURE__*/React.createElement(InfoIcon, {
    label: "Information",
    color: "var(--ds-icon-subtle, #505258)"
  }))), /*#__PURE__*/React.createElement(RovoIcon, {
    label: "AI",
    color: "var(--ds-icon-subtle, #505258)"
  }));
};