/**
 * Shared domain types for the LibNovel UI.
 *
 * Server-only types (full PocketBase record shapes) live in
 * src/lib/server/pocketbase.ts. This file holds the types that are
 * safe to import in both server and client code.
 */

// ── Voice ─────────────────────────────────────────────────────────────────────

/** A single TTS voice returned by GET /api/voices. */
export interface Voice {
	/** Voice identifier passed to TTS clients (e.g. "af_bella", "alba"). */
	id: string;
	/** TTS engine: "kokoro" | "pocket-tts" | "cfai". */
	engine: string;
	/** Primary language tag (e.g. "en-us", "en-gb", "en", "es", "fr"). */
	lang: string;
	/** Gender: "f" | "m". */
	gender: string;
}

// ── Comments ─────────────────────────────────────────────────────────────────

export interface BookComment {
	id: string;
	slug: string;
	user_id: string;
	username: string;
	body: string;
	upvotes: number;
	downvotes: number;
	created: string;
	parent_id?: string;
	replies?: BookComment[];
}

// ── User settings ─────────────────────────────────────────────────────────────

export interface UserSettings {
	voice: string;
	speed: number;
	autoNext: boolean;
	theme: string;
}
