import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
import PreviewBlockResolvedView from './resolved';
/**
 * Represents a PreviewBlock, which typically contains media or other large format content.
 * @public
 * @param {PreviewBlockProps} PreviewBlock
 * @see Block
 */
const PreviewBlock = ({
  testId = 'smart-block-preview',
  overrideUrl,
  ...blockProps
}) => {
  var _blockProps$size;
  const ui = useFlexibleUiOptionContext();
  return /*#__PURE__*/React.createElement(PreviewBlockResolvedView, _extends({}, 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
  }));
};
export default PreviewBlock;