"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("../../../../../../constants");
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
var _elements = require("../../../elements");
var _block = _interopRequireDefault(require("../../block"));
var _aiFooterMetadata = require("./ai-footer-metadata");
var AIFooterBlockResolvedView = function AIFooterBlockResolvedView(props) {
  var _context$actions;
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
  var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.AISummaryAction];
  var testId = props.testId;
  return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, props, {
    testId: "".concat(testId, "-resolved-view")
  }), /*#__PURE__*/_react.default.createElement(_elements.Provider, {
    appearance: "subtle",
    testId: "".concat(testId, "-provider")
  }), actionData ? /*#__PURE__*/_react.default.createElement(_aiFooterMetadata.AIFooterMetadata, (0, _extends2.default)({}, actionData, {
    testId: "".concat(testId, "-ai-metadata")
  })) : null);
};
var _default = exports.default = AIFooterBlockResolvedView;