package com.tiedup.remake.items;

import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;

/**
 * Cell Key - Universal key for iron bar doors.
 *
 * Phase: Kidnapper Revamp - Cell System
 *
 * Unlike regular keys which have UUIDs and can only unlock matching locks,
 * the Cell Key can unlock any iron bar door regardless of which key locked it.
 *
 * This is a convenience item for kidnappers to manage their cells without
 * needing to track individual keys.
 *
 * Does NOT unlock regular bondage items (collars, cuffs, etc.) - only iron bar doors.
 */
public class ItemCellKey extends Item {

    public ItemCellKey() {
        super(new Item.Properties().stacksTo(1));
    }

    @Override
    public void appendHoverText(
        ItemStack stack,
        @Nullable Level level,
        List<Component> tooltip,
        TooltipFlag flag
    ) {
        tooltip.add(
            Component.translatable("item.tiedup.cell_key.desc").withStyle(
                ChatFormatting.GRAY
            )
        );
        tooltip.add(
            Component.translatable("item.tiedup.cell_key.restriction").withStyle(
                ChatFormatting.DARK_GRAY
            )
        );
    }

    @Override
    public boolean isFoil(ItemStack stack) {
        // Slight shimmer to indicate it's a special key
        return true;
    }
}
