// packages/block-library/src/terms-query/utils.js
import { store as coreStore } from "@wordpress/core-data";
import { useSelect } from "@wordpress/data";
import { useMemo } from "@wordpress/element";
function usePublicTaxonomies() {
  const taxonomies = useSelect(
    (select) => select(coreStore).getTaxonomies({ per_page: -1 }),
    []
  );
  return useMemo(() => {
    return taxonomies?.filter(
      ({ visibility }) => visibility?.publicly_queryable
    ) || [];
  }, [taxonomies]);
}
export {
  usePublicTaxonomies
};
//# sourceMappingURL=utils.js.map
