import React from 'react';
import PropTypes from 'prop-types';
import CapRow from '@capillarytech/cap-ui-library/CapRow';
import UnifiedPreview from './UnifiedPreview';

/**
 * PreviewSection - Wrapper that renders UnifiedPreview component
 * UnifiedPreview handles all channel-specific preview rendering
 */
const PreviewSection = ({
  unifiedPreviewProps,
}) => (
  <CapRow useLegacy className="test-and-preview-section panel-section">
    <UnifiedPreview {...unifiedPreviewProps} />
  </CapRow>
);

PreviewSection.propTypes = {
  unifiedPreviewProps: PropTypes.object.isRequired,
};

export default PreviewSection;
