import Image from "next/image"; import Link from "next/link"; import type { Locale } from "@/lib/i18n"; import { getMelodyDirectoryCopy, getMelodyPath } from "@/lib/melody-content"; import AudioPlayer from "@/components/public/audio-player"; export default function MelodyDetail({ locale, melody }: { locale: Locale; melody: { id: string; slug: string; titleAr: string; titleEn: string; descAr: string | null; descEn: string | null; audioFile: string; coverImage: string | null; isDownloadable: boolean; category: { nameAr: string; nameEn: string } } }) { const title = locale === "ar" ? melody.titleAr : melody.titleEn; const description = locale === "ar" ? melody.descAr : melody.descEn; const category = locale === "ar" ? melody.category.nameAr : melody.category.nameEn; const copy = getMelodyDirectoryCopy(locale); return (
← {copy.back}

{category}

{title}

{description ?

{description}

: null}
{melody.coverImage ?
{title}
: null}
); }