using DeepDrftModels.DTOs;
using Models.Common;
using NetBlocks.Models;
namespace DeepDrftPublic.Client.Services;
///
/// Track metadata fetch abstraction. Both SSR and WASM renders are served by
/// TrackClientDataService in this assembly, which delegates to
/// over HTTP. Components inject this single seam
/// so they do not branch on render mode.
///
public interface ITrackDataService
{
Task>> GetPage(
int pageNumber,
int pageSize,
string? sortColumn = null,
bool sortDescending = false,
string? searchText = null,
string? album = null,
string? genre = null,
long? releaseId = null);
/// All releases with track counts, title-ascending.
Task>> GetAlbums();
/// Distinct non-null genres with track counts.
Task>> GetGenres();
Task> GetTrack(string trackId);
///
/// The per-track high-res waveform datum, addressed by the track's EntryKey (phase-12 §5b — the
/// datum is the track's; the release is only addressing context). Success with a value when a
/// high-res datum is stored; success with a null value when none is (a not-yet-backfilled track —
/// a valid state, not a failure, the visualizer blanks); failure on any other transport error.
///
Task> GetTrackWaveform(string trackEntryKey);
///
/// Fetches a random track from the public library for instant play. Success with a value on a
/// hit; success with a null value when the library is empty (a valid state, not a failure);
/// failure on any other transport error.
///
Task> GetRandomTrack();
}