"use strict";

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