"use client";

import { Verdict } from "../../hooks/features/image-scan/useDetectorPanel";

const COPY = {
  synthetic: "SYNTHETIC",
  authentic: "AUTHENTIC",
  uncertain: "UNCERTAIN",
} as const;

const COLOR = {
  synthetic: "var(--color-seal-red)",
  authentic: "var(--color-seal-green)",
  uncertain: "var(--color-seal-amber)",
} as const;

export default function Stamp({ verdict }: { verdict: Verdict }) {
  const color = COLOR[verdict];
  return (
    <div
      className="animate-stamp pointer-events-none absolute -bottom-3 -right-3 z-10 flex h-20 w-20 rotate-[-8deg] items-center justify-center rounded-full"
      style={{
        border: `2.5px solid ${color}`,
        color,
        background:
          "color-mix(in oklab, var(--color-paper-raised) 88%, transparent)",
        boxShadow: "0 6px 16px -6px rgba(18,24,38,0.35)",
      }}
    >
      <div
        className="absolute inset-0.75 rounded-full"
        style={{ border: `1px solid ${color}`, opacity: 0.55 }}
      />
      <span className="text-center  text-[9.5px] font-bold leading-tight tracking-wide">
        {COPY[verdict]}
      </span>
    </div>
  );
}
