package com.tiedup.remake.entities.damsel.components;

import java.util.UUID;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;

/**
 * Interface for AI controller callbacks to EntityDamsel.
 * Provides access to entity state and methods needed by AI systems.
 *
 */
public interface IAIHost {
    // BASIC ENTITY ACCESS

    /**
     * Get the entity's level/world.
     */
    Level level();

    /**
     * Get the entity's UUID.
     */
    UUID getUUID();

    /**
     * Get the entity's display name.
     */
    String getNpcName();

    /**
     * Get the entity's random instance.
     */
    net.minecraft.util.RandomSource getRandom();

    /**
     * Get the entity's bounding box.
     */
    AABB getBoundingBox();

    // LEASH SYSTEM ACCESS

    /**
     * Check if entity is leashed.
     */
    boolean isLeashed();

    /**
     * Get the entity holding the leash.
     */
    Entity getLeashHolder();

    /**
     * Get current movement delta.
     */
    Vec3 getDeltaMovement();

    /**
     * Set movement delta.
     */
    void setDeltaMovement(Vec3 motion);

    /**
     * Get max step height.
     */
    float maxUpStep();

    /**
     * Set max step height.
     */
    void setMaxUpStep(float height);

    /**
     * Teleport entity to coordinates.
     */
    void teleportTo(double x, double y, double z);

    /**
     * Calculate distance to another entity.
     */
    float distanceTo(Entity other);

    /**
     * Get entity X position.
     */
    double getX();

    /**
     * Get entity Y position.
     */
    double getY();

    /**
     * Get entity Z position.
     */
    double getZ();

    // COMPONENT ACCESS

    /**
     * Get bondage manager component.
     */
    DamselBondageManager getBondageManager();

    /**
     * Get personality system component.
     */
    DamselPersonalitySystem getPersonalitySystem();

    // BONDAGE STATE QUERIES (delegated)

    /**
     * Check if entity is tied up.
     */
    boolean isTiedUp();

    /**
     * Check if entity is gagged.
     */
    boolean isGagged();

    /**
     * Check if entity is a captive.
     */
    boolean isCaptive();
}
