import Image from "@/components/ui/resilient-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"; import { stygianBossPositionLabels } from "@/lib/stygian/constants"; 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 = stygianBossPositionLabels[position]; return ( <> {boss ? ( ) : ( {position + 1} )} {positionLabel} {boss?.recommendedMechanics.some(Boolean) ? ( {boss.recommendedMechanics.map((mechanic, index) => mechanic ? ( ) : null, )} ) : null} > ); } export function StygianBossCard({ boss, level, children, mechanicsId, }: { boss: StygianBossDisplay; level: 105 | 110; children: ReactNode; mechanicsId?: string; }) { return ( {boss.name} เลเวล {level} - HP {Math.round(boss.hp).toLocaleString("en-US")} {children} Boss Information & Mechanics {boss.mechanics.map((mechanic, index) => ( {mechanic.name} ))} ); }
เลเวล {level} - HP {Math.round(boss.hp).toLocaleString("en-US")}