import Image from "next/image"; import { CheckIcon, XIcon } from "lucide-react"; import type { ReactNode } from "react"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; import { Card, CardContent } from "@/components/ui/card"; import { LunarisText } from "@/components/public/lunaris-text"; import { parseLunarisText } from "@/lib/catalog/lunaris"; export type StygianBossDisplay = { name: string; imageUrl: string; hp: number; description: string; mechanics: { name: string; description: string }[]; recommendedMechanics: string[]; recommendedMechanicTypes: string[]; }; function RecommendedMechanic({ mechanic, type, }: { mechanic: string; type: string; }) { const parts = mechanic.split(/(\{SPRITE_PRESET#\d+\})/gu); return ( {parts.map((part, index) => { const preset = /^\{SPRITE_PRESET#(\d+)\}$/u.exec(part)?.[1]; if (preset) return ( ); return part ? ( ) : null; })} {type === "Disadvantage" ? ( ) : type === "Advantage" ? ( ) : null} ); } export function StygianBossTab({ boss, position, priority = false, }: { boss: StygianBossDisplay | undefined; position: number; priority?: boolean; }) { const positionLabel = ["บน", "กลาง", "ล่าง"][position]; return ( <> {boss ? ( ) : ( {position + 1} )} {positionLabel} {boss?.recommendedMechanics.some(Boolean) ? ( {boss.recommendedMechanics.map((mechanic, index) => mechanic ? ( ) : null, )} ) : null} > ); } export function StygianBossCard({ boss, level, children, }: { boss: StygianBossDisplay; level: 105 | 110; children: ReactNode; }) { return ( {boss.name} Level {level} - HP {Math.round(boss.hp).toLocaleString("en-US")} Boss overview {boss.mechanics.map((mechanic, index) => ( {mechanic.name} ))} {children} ); }
Level {level} - HP {Math.round(boss.hp).toLocaleString("en-US")}