"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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
var _resolved = _interopRequireDefault(require("./resolved"));
var _excluded = ["testId", "overrideUrl"];
/**
 * Represents a PreviewBlock, which typically contains media or other large format content.
 * @public
 * @param {PreviewBlockProps} PreviewBlock
 * @see Block
 */
var PreviewBlock = function PreviewBlock(_ref) {
  var _blockProps$size;
  var _ref$testId = _ref.testId,
    testId = _ref$testId === void 0 ? 'smart-block-preview' : _ref$testId,
    overrideUrl = _ref.overrideUrl,
    blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
  return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, blockProps, {
    size: (_blockProps$size = blockProps.size) !== null && _blockProps$size !== void 0 ? _blockProps$size : ui === null || ui === void 0 ? void 0 : ui.size,
    testId: testId,
    overrideUrl: overrideUrl
  }));
};
var _default = exports.default = PreviewBlock;