package com.tiedup.remake.v2.bondage.component;

import java.util.List;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;

/**
 * A reusable behavior module for data-driven bondage items.
 * Components are declared in JSON and instantiated per item definition.
 */
public interface IItemComponent {

    default void onEquipped(ItemStack stack, LivingEntity entity) {}

    default void onUnequipped(ItemStack stack, LivingEntity entity) {}

    default boolean blocksUnequip(ItemStack stack, LivingEntity entity) {
        return false;
    }

    default void appendTooltip(ItemStack stack, @Nullable Level level, List<Component> tooltip, TooltipFlag flag) {}
}
