"use strict";

exports.__esModule = true;
exports.usePageButtonBiParams = void 0;
var _react = require("react");
var _providers = require("../providers");
var _ToolbarCollectionContext = require("./ToolbarCollectionContext");
const usePageButtonBiParams = () => {
  const entityContext = (0, _react.useContext)(_providers.entityPageContext);
  const collectionContext = (0, _react.useContext)(_providers.collectionPageContext);
  const toolbarContext = (0, _react.useContext)(_ToolbarCollectionContext.ToolbarCollectionContext);
  if (toolbarContext) {
    return {
      pageType: 'Collection',
      location: 'Patterns toolbar'
    };
  }
  if (entityContext) {
    return {
      pageType: 'Entity',
      location: 'Entity Page Header'
    };
  }
  if (collectionContext) {
    return {
      pageType: 'Collection',
      location: 'Collection Page Header'
    };
  }
  return {
    pageType: undefined,
    location: undefined
  };
};
exports.usePageButtonBiParams = usePageButtonBiParams;
//# sourceMappingURL=usePageButtonBiParams.js.map