import styled from '@emotion/styled';
import PropTypes from 'prop-types';
import TablePreviewPage from './table';
import GraphicPreviewPage from './graphic';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
function DataPreviewPage({
  data,
  feedType = 'data-tracker',
  ...rest
}) {
  return /*#__PURE__*/_jsxs(Container, {
    ...rest,
    children: [feedType === 'data-tracker' && data.type === 'table' && /*#__PURE__*/_jsx(TablePreviewPage, {
      data: data
    }), (feedType === 'graphic' || feedType === 'gallery') && /*#__PURE__*/_jsx(GraphicPreviewPage, {
      data: data
    })]
  });
}
const Container = styled.div`
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 4px;
  &:last-child {
    margin-bottom: 0;
  }
`;
DataPreviewPage.propTypes = {
  data: PropTypes.object.isRequired,
  feedType: PropTypes.string
};
export default DataPreviewPage;