import React from 'react';
import { useSettingsPageContext } from '../../providers';
import { useFormPageHeader } from '../FormPage';
import { SettingsPageActionsBar } from '../../components/SettingsPage/SettingsPageActionsBar';
export function useSettingsPageHeader(child) {
    const state = useSettingsPageContext();
    const { title = null, subtitle = null, breadcrumbs = null, } = !state.isFetching ? child.props : {};
    const header = useFormPageHeader(child, {
        headerProps: {
            dataHook: 'settings-page-header',
            actionsBar: (React.createElement(SettingsPageActionsBar, { moreActions: child.props.moreActions })),
        },
        overrides: {
            title,
            subtitle,
            breadcrumbs,
        },
    });
    return header;
}
//# sourceMappingURL=useSettingsPageHeader.js.map