"use strict";

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