package com.fabledsword.minstrel.api.endpoints

import com.fabledsword.minstrel.models.wire.LikedIdsWire
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

/**
 * Retrofit interface for `/api/likes`. Mirrors
 * `flutter_client/lib/api/endpoints/likes.dart`.
 *
 * Path segment `kind` is one of "artists" | "albums" | "tracks"
 * (plural, matching the server route). The Repository hides that
 * pluralization mapping behind a typed enum so callers pass
 * "artist" / "album" / "track" everywhere else.
 *
 * Paged list endpoints (`/api/likes/{kind}?limit&offset`) are
 * intentionally omitted — the Liked tab renders straight from
 * `cached_likes`, hydrated against the per-entity caches.
 */
interface LikesApi {
    @POST("api/likes/{kind}/{id}")
    suspend fun like(@Path("kind") kind: String, @Path("id") id: String)

    @DELETE("api/likes/{kind}/{id}")
    suspend fun unlike(@Path("kind") kind: String, @Path("id") id: String)

    @GET("api/likes/ids")
    suspend fun ids(): LikedIdsWire
}
