"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = useDefaultPatternCategories;
var _coreData = require("@wordpress/core-data");
var _data = require("@wordpress/data");
var _lockUnlock = require("../../lock-unlock");
var _store = require("../../store");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

function useDefaultPatternCategories() {
  const blockPatternCategories = (0, _data.useSelect)(select => {
    var _settings$__experimen;
    const {
      getSettings
    } = (0, _lockUnlock.unlock)(select(_store.store));
    const settings = getSettings();
    return (_settings$__experimen = settings.__experimentalAdditionalBlockPatternCategories) !== null && _settings$__experimen !== void 0 ? _settings$__experimen : settings.__experimentalBlockPatternCategories;
  });
  const restBlockPatternCategories = (0, _data.useSelect)(select => select(_coreData.store).getBlockPatternCategories());
  return [...(blockPatternCategories || []), ...(restBlockPatternCategories || [])];
}
//# sourceMappingURL=use-default-pattern-categories.js.map