"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.useSettingsPageHeader = useSettingsPageHeader;
var _react = _interopRequireDefault(require("react"));
var _providers = require("../../providers");
var _FormPage = require("../FormPage");
var _SettingsPageActionsBar = require("../../components/SettingsPage/SettingsPageActionsBar");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/state/SettingsPage/useSettingsPageHeader.tsx";
function useSettingsPageHeader(child) {
  const state = (0, _providers.useSettingsPageContext)();
  const {
    title = null,
    subtitle = null,
    breadcrumbs = null
  } = !state.isFetching ? child.props : {};
  const header = (0, _FormPage.useFormPageHeader)(child, {
    headerProps: {
      dataHook: 'settings-page-header',
      actionsBar: /*#__PURE__*/_react.default.createElement(_SettingsPageActionsBar.SettingsPageActionsBar, {
        moreActions: child.props.moreActions,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 20,
          columnNumber: 9
        }
      })
    },
    overrides: {
      title,
      subtitle,
      breadcrumbs
    }
  });
  return header;
}
//# sourceMappingURL=useSettingsPageHeader.js.map