package handlers

import (
	"strings"

	"zlh-agent/internal/state"
)

func isVanillaModLocked(cfg *state.Config) bool {
	if cfg == nil {
		return false
	}
	if !strings.EqualFold(cfg.ContainerType, "game") {
		return false
	}
	if !strings.EqualFold(cfg.Game, "minecraft") {
		return false
	}
	if strings.EqualFold(cfg.InternalProfile, "vanilla-fabric") {
		return true
	}
	return strings.EqualFold(cfg.Variant, "vanilla")
}

func isModsPath(rel string) bool {
	rel = strings.TrimSpace(rel)
	return rel == "mods" || strings.HasPrefix(rel, "mods/")
}
