"use strict";

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