import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { InternalActionName } from '../../../../../../constants';
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
import { Provider } from '../../../elements';
import Block from '../../block';
import { AIFooterMetadata } from './ai-footer-metadata';
var AIFooterBlockResolvedView = function AIFooterBlockResolvedView(props) {
  var _context$actions;
  var context = useFlexibleUiContext();
  var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.AISummaryAction];
  var testId = props.testId;
  return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
    testId: "".concat(testId, "-resolved-view")
  }), /*#__PURE__*/React.createElement(Provider, {
    appearance: "subtle",
    testId: "".concat(testId, "-provider")
  }), actionData ? /*#__PURE__*/React.createElement(AIFooterMetadata, _extends({}, actionData, {
    testId: "".concat(testId, "-ai-metadata")
  })) : null);
};
export default AIFooterBlockResolvedView;