"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useCategoryCollection = void 0;
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
var _useReactQueryLiveCollection = require("../useReactQueryLiveCollection");
var _constants = require("../../../../core/constants");
const useCategoryCollection = ({
  params
}) => {
  const query = (0, _useReactQueryLiveCollection.useLiveCollection)({
    key: [_constants.QUERY_KEY.CATEGORY_COLLECTION],
    params,
    fetcher: _tsSdkReactNative.CategoryRepository.getCategories
  });
  return {
    ...query,
    categories: query.data
  };
};
exports.useCategoryCollection = useCategoryCollection;
//# sourceMappingURL=useCategoryCollection.js.map