package com.tiedup.remake.dialogue;

/**
 * Defines the type of NPC speaker for dialogue routing.
 * Each speaker type maps to a dialogue folder structure.
 *
 * Dialogue System: Universal NPC dialogue support
 */
public enum SpeakerType {
    /**
     * EntityDamsel and EntityDamselShiny.
     * Uses personality-based dialogue folders (timid/, fierce/, etc.)
     */
    DAMSEL("damsel"),

    /**
     * EntityKidnapper (base kidnapper).
     * Uses theme-based personality mapping.
     */
    KIDNAPPER("kidnapper"),

    /**
     * EntityKidnapperElite.
     * More arrogant/confident dialogue tone.
     */
    KIDNAPPER_ELITE("kidnapper_elite"),

    /**
     * EntityKidnapperArcher.
     * Ranged combat specific dialogue.
     */
    KIDNAPPER_ARCHER("kidnapper_archer"),

    /**
     * EntityKidnapperMerchant.
     * Dual-mode: MERCHANT (greedy) vs HOSTILE (vengeful).
     */
    MERCHANT("merchant"),

    /**
     * EntityMaid.
     * Obedient servant dialogue.
     */
    MAID("maid"),

    /**
     * EntityLaborGuard.
     * Prison guard monitoring prisoners during labor.
     */
    GUARD("guard"),

    /**
     * EntitySlaveTrader.
     * Camp boss, business-focused dialogue.
     */
    TRADER("trader"),

    /**
     * EntityMaster.
     * Pet play master - dominant, commanding dialogue.
     * Buys solo players from Kidnappers.
     */
    MASTER("master");

    private final String folderName;

    SpeakerType(String folderName) {
        this.folderName = folderName;
    }

    /**
     * Get the dialogue folder name for this speaker type.
     * Used for loading dialogue JSON files.
     *
     * @return Folder name (e.g., "kidnapper", "maid")
     */
    public String getFolderName() {
        return folderName;
    }

    /**
     * Check if this is a kidnapper-type speaker.
     * Kidnapper types use theme-based personality mapping.
     *
     * @return true if kidnapper, elite, archer, or merchant
     */
    public boolean isKidnapperType() {
        return (
            this == KIDNAPPER ||
            this == KIDNAPPER_ELITE ||
            this == KIDNAPPER_ARCHER ||
            this == MERCHANT
        );
    }

    /**
     * Check if this is a camp management speaker.
     * Camp speakers have special dialogue for prisoner management.
     *
     * @return true if maid or trader
     */
    public boolean isCampManagement() {
        return this == MAID || this == TRADER || this == GUARD;
    }
}
