import { EntityPageContentElement } from '../../components/EntityPageContent';
import { EntityPageAdditionalContent } from '../../components/EntityPageAdditionalContent';
import { EntityPageMainContent } from '../../components/EntityPageMainContent';
import { EntityPageActionsBar } from '../../components/EntityPage';
import { useFormPageContent } from '../FormPage';

export function useEntityPageContent(
  child: EntityPageContentElement,
  scrollableRef?: HTMLElement | null,
) {
  const pageContent = useFormPageContent(child, {
    elementName: 'EntityPage',
    MainContentElement: EntityPageMainContent,
    AdditionalContentElement: EntityPageAdditionalContent,
    FooterElement: EntityPageActionsBar,
    scrollableRef,
  });

  return pageContent;
}
