package com.tiedup.remake.entities.skins;

import com.tiedup.remake.entities.KidnapperVariant;

/**
 * Registry and manager for Maid skin variants.
 *
 * Maids are servants of Slave Traders who execute their orders.
 * They wear classic maid outfits.
 */
public class MaidSkinManager {

    public static final SkinManagerCore<KidnapperVariant> CORE =
        new SkinManagerCore<>(
            "MaidSkinManager",
            "maid",
            SkinDefinition::toKidnapperVariant,
            MaidSkinManager::loadHardcodedDefaults
        );

    /**
     * Initialize and register all maid variants.
     */
    public static void registerDefaults() {
        CORE.registerDefaults();
    }

    /**
     * Load hardcoded default maid skin variants.
     */
    private static void loadHardcodedDefaults() {
        // Generic numbered skins (maid_mob_1 to maid_mob_10) - use random names
        for (int i = 1; i <= 10; i++) {
            CORE.registerVariant(
                createMaidVariant("maid_mob_" + i, false, null)
            );
        }

        // Named skins (specific characters)
        CORE.registerVariant(createMaidVariant("maid_default", true, "Maid"));
        CORE.registerVariant(createMaidVariant("maid_classic", true, "Sakura"));

        // CORE.registerVariant(createMaidVariant("maid_gothic", true, "Gothic Maid"));
        // CORE.registerVariant(createMaidVariant("maid_french", true, "Marie"));
    }

    /**
     * Create a maid variant with proper texture path.
     * Uses KidnapperVariant.createWithSubfolder() helper.
     *
     * @param textureName Texture file name without extension
     * @param hasSlimArms True if this variant uses slim arms
     * @param displayName Display name, or null for generic "Maid"
     * @return Maid variant
     */
    private static KidnapperVariant createMaidVariant(
        String textureName,
        boolean hasSlimArms,
        String displayName
    ) {
        return KidnapperVariant.createWithSubfolder(
            textureName,
            "maid",
            hasSlimArms,
            displayName != null ? displayName : "Maid",
            Gender.FEMALE
        );
    }
}
