import { PostRepository } from '@amityco/ts-sdk-react-native';
import { useLiveCollection } from '../useReactQueryLiveCollection';
import { QUERY_KEY } from '../../../../core/constants';
export const usePostCollection = ({
  params,
  enabled = true
}) => {
  const query = useLiveCollection({
    key: [QUERY_KEY.POSTS_COLLECTION, JSON.stringify(params)],
    params,
    fetcher: PostRepository.getPosts,
    enabled
  });
  return {
    ...query,
    posts: query.data
  };
};
//# sourceMappingURL=usePostCollection.js.map