"use client"

// Scorekort-fanen for tilskuer-visningen (ADR-044, 2026-08-06). Gjenbruker
// round-scorecard.tsx sin RoundScorecard UENDRET (samme formatspesifikke
// rutenett som eiersiden -- se komponentens `publicMode`-prop), kun matet
// fra /public/rounds/* i stedet for /rounds/*. Egen sticky header + fane-
// stripe her, siden RoundScorecard sin egen header slås av med
// `embedded`.

import { Trophy } from "lucide-react"
import { WatchTabs } from "@/components/watch-tabs"
import { RoundScorecard } from "@/components/round-scorecard"

export function WatchScorecard({ roundId }: { roundId: string }) {
  return (
    <div className="min-h-dvh bg-background">
      <header className="sticky top-0 z-10 border-b border-border bg-background/95 backdrop-blur">
        <div className="mx-auto flex min-h-14 max-w-xl items-center gap-2 px-4 py-2">
          <span className="flex min-h-11 items-center gap-1.5 text-base font-bold text-foreground">
            <Trophy aria-hidden="true" className="size-5 text-primary" />
            Følger live
          </span>
        </div>
        <WatchTabs roundId={roundId} active="scorecard" />
      </header>
      <RoundScorecard roundId={roundId} embedded publicMode />
    </div>
  )
}
