import { get, post } from "./serviceHelper";
// Service Functions
/**
 * Gets all favorites for the current user
 */
export async function getAllFavorites() {
    return await get("/parhelia/favorites/index");
}
/**
 * Toggles a favorite item (adds if not exists, removes if exists)
 */
export async function toggleFavorite(request) {
    return await post("/parhelia/favorites/toggle", request);
}
/**
 * Checks if an item is favorited by the current user
 */
export async function isFavorite(itemId, language) {
    const url = `/parhelia/favorites/isfavorite?itemId=${encodeURIComponent(itemId)}&language=${encodeURIComponent(language)}`;
    return await get(url);
}
/**
 * Updates the name of a favorite item
 */
export async function updateFavoriteName(request) {
    return await post("/parhelia/favorites/updatename", request);
}
//# sourceMappingURL=favouritesService.js.map