package com.tiedup.remake.state;

import net.minecraft.world.entity.player.Player;

/**
 * Active coercion interface for kidnapped entities.
 *
 * <p>Covers tightening binds, chloroform, electric shocks,
 * and forceful item removal by another entity.</p>
 *
 * @see IRestrainableEntity
 * @see IRestrainable
 */
// C6-V2: takeBondageItemBy narrowed from IRestrainable to IRestrainableEntity
public interface ICoercible extends IRestrainableEntity {
    // SPECIAL INTERACTIONS

    /**
     * Tighten binds on this entity (increase resistance).
     * Called when master uses paddle/whip on slave.
     *
     * <p><b>Effects:</b></p>
     * <ul>
     *   <li>Resets bind resistance to maximum</li>
     *   <li>Plays slap/whip sound</li>
     *   <li>Shows message to entity</li>
     * </ul>
     *
     * @param tightener The player tightening the binds
     */
    void tighten(Player tightener);

    /**
     * Apply chloroform effect to this entity.
     *
     * <p><b>Effects (from original):</b></p>
     * <ul>
     *   <li>Slowness effect (duration from parameter)</li>
     *   <li>Weakness effect</li>
     *   <li>Prevents movement/interaction</li>
     * </ul>
     *
     * @param duration Effect duration in ticks
     */
    void applyChloroform(int duration);

    /**
     * Shock this kidnapped entity.
     * Uses default damage and no message.
     *
     * <p><b>Effects:</b></p>
     * <ul>
     *   <li>Plays electric shock sound</li>
     *   <li>Applies damage (default: 1.0F)</li>
     *   <li>Shows shock particles (client-side)</li>
     * </ul>
     */
    void shockKidnapped();

    /**
     * Shock this kidnapped entity with custom message and damage.
     *
     * @param messageAddon Additional message to send to the entity
     * @param damage Damage amount to apply
     */
    void shockKidnapped(String messageAddon, float damage);

    /**
     * Another entity takes a bondage item from this entity.
     * Used when master removes items from slave.
     *
     * C6-V2: Narrowed from IRestrainable to IRestrainableEntity (only uses identity methods)
     * This allows NPCs to take items from Players or other NPCs
     *
     * @param taker The IRestrainableEntity taking the item
     * @param slotIndex The slot index (0-5: bind, gag, blindfold, earplugs, collar, clothes)
     */
    void takeBondageItemBy(IRestrainableEntity taker, int slotIndex);

    // COLLAR TIMERS

    /**
     * Force-stops and clears any active auto-shock collar timer.
     *
     * <p>Called when:</p>
     * <ul>
     *   <li>GPS collar is removed</li>
     *   <li>Auto-shock collar is removed</li>
     *   <li>Entity is freed from slavery</li>
     * </ul>
     */
    default void resetAutoShockTimer() {
        // Default no-op (NPCs don't have timers by default)
        // PlayerBindState overrides this to clear timer
    }
}
