"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useUser = useUser;
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
var _useLiveObject = _interopRequireDefault(require("../useLiveObject"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function useUser({
  userId,
  enabled = true
}) {
  const {
    item,
    ...rest
  } = (0, _useLiveObject.default)({
    fetcher: _tsSdkReactNative.UserRepository.getUser,
    params: userId,
    enabled: enabled && !!userId
  });
  return {
    user: item,
    ...rest
  };
}
//# sourceMappingURL=useUser.js.map