"use strict";

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