package com.tiedup.remake.entities.skins;

import com.tiedup.remake.entities.DamselVariant;

/**
 * Registry and manager for labor guard skin variants.
 *
 * Uses DamselVariant since EntityLaborGuard extends EntityDamsel.
 * Guard skins are stored in textures/entity/guard/ folder.
 */
public class LaborGuardSkinManager {

    public static final SkinManagerCore<DamselVariant> CORE =
        new SkinManagerCore<>(
            "LaborGuardSkinManager",
            "labor_guard",
            SkinDefinition::toDamselVariant,
            LaborGuardSkinManager::loadHardcodedDefaults
        );

    public static void registerDefaults() {
        CORE.registerDefaults();
    }

    private static void loadHardcodedDefaults() {
        CORE.registerVariant(createGuardVariant("feifei", true, "Feifei"));
    }

    /**
     * Create a guard variant with textures in the guard/ folder.
     */
    private static DamselVariant createGuardVariant(
        String textureName,
        boolean hasSlimArms,
        String displayName
    ) {
        return new DamselVariant(
            textureName,
            net.minecraft.resources.ResourceLocation.fromNamespaceAndPath(
                "tiedup",
                "textures/entity/guard/" + textureName + ".png"
            ),
            hasSlimArms,
            displayName,
            Gender.FEMALE
        );
    }
}
