import Link from "next/link";
import { AppBrand, ArrowLeftIcon } from "@/components/AppBrand";
import { Player } from "@/components/player/Player";

export const metadata = { title: "正在收听 · 听阅" };

export default async function ListenPage({ params }: { params: Promise<{ bookId: string }> }) {
  const { bookId } = await params;
  return (
    <div className="listen-shell">
      <header className="workflow-topbar player-topbar">
        <AppBrand />
        <div><Link className="back-link" href="/"><ArrowLeftIcon />返回书架</Link><Link className="button button-quiet" href={`/books/${bookId}/edit`}>校对正文</Link></div>
      </header>
      <main className="listen-main"><Player bookId={bookId} /></main>
    </div>
  );
}
