{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "audio-episode-player",
  "title": "Audio Episode Player",
  "description": "A podcast episode block: cover art, title, show and facts in the header, the audio player below and the episode actions at the bottom.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [
    "litingyes/blocove/audio-player",
    "badge",
    "separator"
  ],
  "files": [
    {
      "path": "src/registry/blocove/blocks/audio-episode-player.tsx",
      "content": "import type { ReactNode } from 'react'\nimport { cn } from 'cn'\nimport { AudioMedia, AudioPlayer } from '@/components/blocove/media/audio'\nimport { Badge } from '@/components/ui/badge'\nimport { Separator } from '@/components/ui/separator'\n\nexport interface AudioEpisodePlayerProps {\n  /** The episode audio source. */\n  src: string\n  /** The episode title, shown in the header and reported to the player. */\n  title: string\n  /** The show or author the episode belongs to. */\n  show?: string\n  /** Square cover art; it also becomes the player poster. */\n  cover?: string\n  /** Episode number, rendered as a badge. */\n  episode?: number\n  /** A short summary below the player. */\n  description?: string\n  /** A human readable duration, for example `42 min`. */\n  duration?: string\n  /** A human readable publish date. */\n  publishedAt?: string\n  /** Extra actions rendered below the player, usually buttons. */\n  actions?: ReactNode\n  className?: string\n}\n\n/**\n * An episode player: cover art, title, show and facts in the header, the audio\n * player below and the episode actions at the bottom. Built for podcast and\n * audiobook episode lists.\n */\nexport function AudioEpisodePlayer({\n  src,\n  title,\n  show,\n  cover,\n  episode,\n  description,\n  duration,\n  publishedAt,\n  actions,\n  className,\n}: AudioEpisodePlayerProps) {\n  const hasFacts = Boolean(episode) || Boolean(publishedAt) || Boolean(duration)\n\n  return (\n    <article\n      data-slot=\"audio-episode-player\"\n      className={cn(\n        'flex w-full max-w-2xl flex-col gap-4 rounded-xl border bg-card p-4 text-card-foreground sm:p-5',\n        className,\n      )}\n    >\n      <div className=\"flex items-center gap-4\">\n        {cover\n          ? (\n              <img\n                alt=\"\"\n                className=\"size-16 shrink-0 rounded-lg object-cover sm:size-20\"\n                height={160}\n                loading=\"lazy\"\n                src={cover}\n                width={160}\n              />\n            )\n          : null}\n\n        <div className=\"flex min-w-0 flex-col gap-1.5\">\n          {hasFacts\n            ? (\n                <div className=\"flex flex-wrap items-center gap-2 text-xs text-muted-foreground\">\n                  {episode\n                    ? <Badge variant=\"secondary\">{`Ep. ${episode}`}</Badge>\n                    : null}\n                  {publishedAt\n                    ? <span>{publishedAt}</span>\n                    : null}\n                  {duration\n                    ? (\n                        <span className=\"tabular-nums\">\n                          {duration}\n                        </span>\n                      )\n                    : null}\n                </div>\n              )\n            : null}\n\n          <h3 className=\"truncate text-base font-semibold tracking-tight\">\n            {title}\n          </h3>\n\n          {show\n            ? (\n                <p className=\"truncate text-sm text-muted-foreground\">\n                  {show}\n                </p>\n              )\n            : null}\n        </div>\n      </div>\n\n      <AudioPlayer title={title} poster={cover}>\n        <AudioMedia src={src} />\n      </AudioPlayer>\n\n      {description\n        ? (\n            <>\n              <Separator />\n              <p className=\"text-sm text-muted-foreground\">{description}</p>\n            </>\n          )\n        : null}\n\n      {actions\n        ? (\n            <div className=\"flex flex-wrap items-center gap-2\">\n              {actions}\n            </div>\n          )\n        : null}\n    </article>\n  )\n}\n",
      "type": "registry:block",
      "target": "components/blocove/audio-episode-player.tsx"
    }
  ],
  "categories": [
    "media",
    "block"
  ],
  "type": "registry:block"
}