import React, { ReactElement } from 'react';
import LayoutAuthenticated from '../../layouts/Authenticated';
import { fetch } from '../../stores/bid_evaluations/bid_evaluationsSlice';
import EntityRecordViewPage from '../../components/EntityPage/EntityRecordViewPage';

const BidEvaluationsView = () => (
  <EntityRecordViewPage
    singularLabel="Bid Evaluation"
    pluralLabel="Bid Evaluations"
    stateKey="bid_evaluations"
    recordKey="bid_evaluations"
    fetchRecord={fetch}
    listHref="/bid_evaluations/bid_evaluations-list"
    editHref={(id) => `/bid_evaluations/bid_evaluations-edit/?id=${id ?? ''}`}
  />
);

BidEvaluationsView.getLayout = function getLayout(page: ReactElement) {
  return <LayoutAuthenticated permission={'READ_BID_EVALUATIONS'}>{page}</LayoutAuthenticated>;
};

export default BidEvaluationsView;
