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';
const AIFooterBlockResolvedView = props => {
  var _context$actions;
  const context = useFlexibleUiContext();
  const actionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.AISummaryAction];
  const {
    testId
  } = props;
  return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
    testId: `${testId}-resolved-view`
  }), /*#__PURE__*/React.createElement(Provider, {
    appearance: "subtle",
    testId: `${testId}-provider`
  }), actionData ? /*#__PURE__*/React.createElement(AIFooterMetadata, _extends({}, actionData, {
    testId: `${testId}-ai-metadata`
  })) : null);
};
export default AIFooterBlockResolvedView;