"use client" import type React from "react" import Link from "next/link" import { ChevronLeft, Shield, Zap, Eye, Brain, Heart } from "lucide-react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { Separator } from "@/components/ui/separator" import { useUser } from "@/context/user-context" export default function EquipmentPage() { const { userStats } = useUser() // Sample equipment data - in a real app, this would come from the user context const equippedItems = [ { id: "e1", name: "Shadow Monarch's Helmet", rarity: "Legendary" as const, stats: ["+15% Intelligence", "+10% Perception"], setBonus: "Shadow Monarch Set (2/5)", slot: "Head", equipped: true, }, { id: "e2", name: "Gauntlets of Strength", rarity: "Epic" as const, stats: ["+12 Strength", "+8% Critical Rate"], setBonus: "Warrior's Set (1/5)", slot: "Hands", equipped: true, }, { id: "e3", name: "Boots of Agility", rarity: "Rare" as const, stats: ["+10 Agility", "+5% Movement Speed"], setBonus: "None", slot: "Feet", equipped: true, }, { id: "e4", name: "Shadow Monarch's Armor", rarity: "Legendary" as const, stats: ["+20 Defense", "+15% Vitality"], setBonus: "Shadow Monarch Set (2/5)", slot: "Chest", equipped: true, }, { id: "e5", name: "Empty Slot", rarity: "Common" as const, stats: [], setBonus: "None", slot: "Accessory", equipped: false, }, { id: "e6", name: "Empty Slot", rarity: "Common" as const, stats: [], setBonus: "None", slot: "Weapon", equipped: false, }, ] const inventoryItems = [ { id: "i1", name: "Amulet of Wisdom", rarity: "Epic" as const, stats: ["+15 Intelligence", "+10% Mana Regeneration"], setBonus: "Scholar's Set (1/3)", slot: "Accessory", }, { id: "i2", name: "Dagger of Precision", rarity: "Rare" as const, stats: ["+8 Perception", "+12% Critical Damage"], setBonus: "Assassin's Set (1/4)", slot: "Weapon", }, { id: "i3", name: "Bracers of Vitality", rarity: "Uncommon" as const, stats: ["+6 Vitality", "+5% Health Regeneration"], setBonus: "None", slot: "Hands", }, { id: "i4", name: "Shadow Monarch's Greaves", rarity: "Legendary" as const, stats: ["+12 Agility", "+15% Movement Speed"], setBonus: "Shadow Monarch Set (1/5)", slot: "Feet", }, ] // Calculate stat bonuses from equipment const calculateStatBonuses = () => { // In a real app, this would parse the equipment stats and calculate actual bonuses return { str: 18, agi: 10, per: 10, int: 10, vit: 10, } } const statBonuses = calculateStatBonuses() return (
{/* Header */}

Equipment

{/* Equipment Stats */}

Equipment Stats

} name="STR" baseValue={userStats.stats.str} bonusValue={statBonuses.str} /> } name="AGI" baseValue={userStats.stats.agi} bonusValue={statBonuses.agi} /> } name="PER" baseValue={userStats.stats.per} bonusValue={statBonuses.per} /> } name="INT" baseValue={userStats.stats.int} bonusValue={statBonuses.int} /> } name="VIT" baseValue={userStats.stats.vit} bonusValue={statBonuses.vit} />
{/* Equipment Slots */}
Equipped Inventory
{equippedItems.map((item) => ( ))}
{inventoryItems.map((item) => ( ))}
{/* Set Bonuses */}

Set Bonuses

Shadow Monarch Set (2/5) Legendary Set
(2) Set: +15% Intelligence, +10% Perception
(3) Set: +20% Mana Regeneration
(4) Set: +25% Skill Damage
(5) Set: Unlock Shadow Extraction Ability
Warrior's Set (1/5) Epic Set
(2) Set: +15% Strength, +10% Vitality
(3) Set: +20% Physical Damage
(4) Set: +25% Defense
(5) Set: Unlock Berserker Rage Ability
) } function StatBonus({ icon, name, baseValue, bonusValue, }: { icon: React.ReactNode name: string baseValue: number bonusValue: number }) { return (
{icon}
{name}
{baseValue} +{bonusValue}
) } function EquipmentSlotCard({ name, rarity, stats, setBonus, slot, equipped, }: { name: string rarity: "Common" | "Uncommon" | "Rare" | "Epic" | "Legendary" stats: string[] setBonus: string slot: string equipped: boolean }) { const rarityColors = { Common: "text-gray-400", Uncommon: "text-green-400", Rare: "text-[#4cc9ff]", Epic: "text-purple-400", Legendary: "text-yellow-400", } return (
{name} {slot}
{rarity}
{stats.length > 0 ? ( stats.map((stat, index) => (
{stat}
)) ) : (
No item equipped
)} {stats.length > 0 && ( <>
{setBonus}
)}
{equipped && ( )}
) } function EquipmentCard({ name, rarity, stats, setBonus, slot, }: { name: string rarity: "Common" | "Uncommon" | "Rare" | "Epic" | "Legendary" stats: string[] setBonus: string slot: string }) { const rarityColors = { Common: "text-gray-400", Uncommon: "text-green-400", Rare: "text-[#4cc9ff]", Epic: "text-purple-400", Legendary: "text-yellow-400", } return (
{name} {slot}
{rarity}
{stats.map((stat, index) => (
{stat}
))}
{setBonus}
) }