import React from 'react';
import { translate as __ } from 'foremanReact/common/I18n';
import { Nav, NavItem, TabPane, TabContent, TabContainer, Grid, Row, Col } from 'patternfly-react';
import { PropTypes } from 'prop-types';
import { LoadingState } from '../../../components/LoadingState/index';
const ContentDetails = (props) => {
const { contentDetails, schema } = props;
const { loading } = contentDetails;
const tabHeaders = () => {
const tabs = schema.map(node => (
{node.tabHeader}
));
return tabs;
};
const tabPanes = () => {
const tabPane = schema.map(node => (
{node.tabContent}
));
return tabPane;
};
return (
{schema && tabPanes()}
);
};
ContentDetails.propTypes = {
contentDetails: PropTypes.shape({
loading: PropTypes.bool,
name: PropTypes.string,
// Disabling rule as existing code failed due to an eslint-plugin-react update
/* eslint-disable react/forbid-prop-types */
profiles: PropTypes.array,
repositories: PropTypes.array,
artifacts: PropTypes.array,
/* eslint-enable react/forbid-prop-types */
stream: PropTypes.string,
}).isRequired,
schema: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
};
export default ContentDetails;