package com.tiedup.remake.entities;

import com.tiedup.remake.entities.skins.Gender;
import com.tiedup.remake.entities.skins.SkinVariant;
import net.minecraft.resources.ResourceLocation;

/**
 * Represents a damsel skin variant with metadata.
 *
 * Simplified: All skins from damsel folder, no guest distinction.
 *
 * @param id Unique identifier (e.g., "dam_mob_1", "anastasia")
 * @param texture Skin texture location
 * @param hasSlimArms True for Alex/slim model (3px arms), false for Steve/normal (4px arms)
 * @param defaultName Default display name for this variant
 * @param gender Gender of the skin (default FEMALE)
 */
public record DamselVariant(
    String id,
    ResourceLocation texture,
    boolean hasSlimArms,
    String defaultName,
    Gender gender
) implements SkinVariant {
    /**
     * Create a damsel variant from texture name.
     *
     * @param textureName Texture file name without extension (e.g., "dam_mob_1", "anastasia")
     * @param hasSlimArms True if this variant uses slim arms
     * @return Damsel variant
     */
    public static DamselVariant create(
        String textureName,
        boolean hasSlimArms
    ) {
        return create(textureName, hasSlimArms, "Damsel");
    }

    /**
     * Create a damsel variant from texture name with custom display name.
     *
     * @param textureName Texture file name without extension
     * @param hasSlimArms True if this variant uses slim arms
     * @param displayName Display name for this variant
     * @return Damsel variant
     */
    public static DamselVariant create(
        String textureName,
        boolean hasSlimArms,
        String displayName
    ) {
        return new DamselVariant(
            textureName,
            ResourceLocation.fromNamespaceAndPath(
                "tiedup",
                "textures/entity/damsel/" + textureName + ".png"
            ),
            hasSlimArms,
            displayName,
            Gender.FEMALE
        );
    }

    @Override
    public String toString() {
        return (
            "DamselVariant{id='" +
            id +
            "', slim=" +
            hasSlimArms +
            ", name='" +
            defaultName +
            "', gender=" +
            gender +
            "}"
        );
    }
}
