/** * @file Vampire Zones panel β read-only view of all vampire realms. * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ /* eslint-disable max-lines-per-function -- Complex panel with zone grid rendering */ /* eslint-disable react/no-multi-comp -- Sub-component is tightly coupled to the panel */ import { useGame } from "../../context/gameContext.js"; import type { VampireZone } from "@elysium/types"; import type { JSX } from "react"; interface ZoneCardProperties { readonly zone: VampireZone; readonly isLocked: boolean; readonly unlockBossName: string | undefined; readonly unlockQuestName: string | undefined; } /** * Renders a single vampire zone card. * @param props - The zone card properties. * @param props.zone - The zone data. * @param props.isLocked - Whether this zone is currently locked. * @param props.unlockBossName - Name of the boss required to unlock, if any. * @param props.unlockQuestName - Name of the quest required to unlock, if any. * @returns The JSX element. */ const VampireZoneCard = ({ zone, isLocked, unlockBossName, unlockQuestName, }: ZoneCardProperties): JSX.Element => { return (
{zone.description}
{isLocked && (unlockBossName !== undefined || unlockQuestName !== undefined) ?{"Unlock requirements:"}
{unlockBossName === undefined ? null :{"π©Έ Defeat: "} {unlockBossName}
} {unlockQuestName === undefined ? null :{"π Complete: "} {unlockQuestName}
}{"Loading..."}
{"The Vampire expansion is not yet unlocked."}