import React from 'react';
import PropTypes from 'prop-types';
import {
TableComposable,
Thead,
Tbody,
Tr,
Th,
Td,
} from '@patternfly/react-table';
import {
EmptyState,
EmptyStateIcon,
Spinner,
Title,
Grid,
} from '@patternfly/react-core';
import { SearchIcon, ExclamationCircleIcon } from '@patternfly/react-icons';
import { STATUS } from 'foremanReact/constants';
import { translate as __ } from 'foremanReact/common/I18n';
import { getColumns } from './helpers';
const ReportsTable = ({ reports, status, fetchReports }) => {
const columns = getColumns(fetchReports);
let tableBody = null;
let tableHead = null;
let emptyState = null;
if (status === STATUS.RESOLVED) {
if (reports.length) {
tableHead = (
{columns.map(({ width, title }, columnIndex) => (
);
tableBody = (
{title}
))}