import { useFormPageContent } from '../FormPage';
import { SettingsPageContentElement } from '../../components/SettingsPageContent';
import { SettingsPageActionsBar } from '../../components/SettingsPage/SettingsPageActionsBar';
import { SettingsPageMainContent } from '../../components/SettingsPageMainContent';
import { SettingsPageAdditionalContent } from '../../components/SettingsPageAdditionalContent';

export function useSettingsPageContent(
  child: SettingsPageContentElement,
  scrollableRef?: HTMLElement | null,
) {
  const pageContent = useFormPageContent(child, {
    elementName: 'SettingsPage',
    MainContentElement: SettingsPageMainContent,
    AdditionalContentElement: SettingsPageAdditionalContent,
    FooterElement: SettingsPageActionsBar,
    scrollableRef,
  });

  return pageContent;
}
