"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useUserCollection = void 0;
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
var _useReactQueryLiveCollection = require("../useReactQueryLiveCollection");
var _constants = require("../../../../core/constants");
const useUserCollection = ({
  params,
  enabled = true
}) => {
  const query = (0, _useReactQueryLiveCollection.useLiveCollection)({
    key: [_constants.QUERY_KEY.USERS_COLLECTION, JSON.stringify(params)],
    params,
    fetcher: _tsSdkReactNative.UserRepository.getUsers,
    enabled
  });
  return {
    ...query,
    users: query.data
  };
};
exports.useUserCollection = useUserCollection;
//# sourceMappingURL=useUserCollection.js.map