/** * Data access layer for Rāja-vidyā: The King of Knowledge (RV). * * Delegates to the generic book data layer which calls the BFF API. */ import { getBookMeta, getIntroSegments, getIntroSegment, getChapter, getContent, getSidebarItems, type BookMeta, type IntroSegment, type Chapter, type SidebarItem, } from "@/lib/books"; const CODE = "rv"; // Re-export types with book-specific names for backwards compatibility export type RvMeta = BookMeta; export type RvChapterEntry = { number: number; title: string }; export type RvIntroSegment = IntroSegment; export type RvChapter = Chapter; export type RvSidebarItem = SidebarItem; export async function getRvMeta(): Promise { return getBookMeta(CODE); } export async function getRvIntroSegments(): Promise { return getIntroSegments(CODE); } export async function getRvIntroSegment( slug: string, ): Promise { return getIntroSegment(CODE, slug); } export async function getRvChapter( chapterNum: number, ): Promise { return getChapter(CODE, String(chapterNum)); } export async function getRvContent( slug: string, ): Promise { return getContent(CODE, slug); } export async function getRvSidebarItems(): Promise { return getSidebarItems(CODE); }