import {
ArrowRight,
Circle,
EyeOff,
Highlighter,
MessageSquare,
Minus,
Pencil,
Square,
Stamp,
Strikethrough,
Type,
Underline,
} from "lucide-react";
import type {
AnnotationDTO,
DrawData,
HighlightData,
ShapeData,
} from "@/db/schema";
/** ไอคอนตามชนิด annotation — presentational ล้วน **ไม่มี "use client"** ให้หน้าสรุป
* (server component, F15) ใช้ร่วมกับ sidebar (client) ได้: lucide icon เป็น SVG
* component ล้วน render ฝั่ง server ได้ (ย้ายมาจาก AnnotationSidebar.tsx) */
export function AnnotationTypeIcon({
type,
data,
className = "h-4 w-4 shrink-0 text-ink-soft",
}: {
type: AnnotationDTO["type"];
data: AnnotationDTO["data"];
className?: string;
}) {
if (type === "HIGHLIGHT") {
const style = (data as HighlightData).style ?? "highlight";
if (style === "underline") return ;
if (style === "strikethrough") return ;
return ; // highlight / squiggle
}
if (type === "DRAW")
return (data as DrawData).pen === "highlighter" ? (
) : (
);
if (type === "REDACTION") return ;
if (type === "TEXTBOX") return ;
if (type === "STAMP") return ;
if (type === "SHAPE") {
const shape = (data as ShapeData).shape;
if (shape === "rect") return ;
if (shape === "ellipse") return ;
if (shape === "line") return ;
return ;
}
return ;
}