package handlers

import (
	"net/http"

	"github.com/breakpilot/ai-compliance-sdk/internal/iace"
	"github.com/gin-gonic/gin"
)

// ListMachineTypes handles GET /machine-types
// Returns the controlled machine-type vocabulary the pattern engine gates on,
// each with a German label + UI group. The project-create form uses this so the
// machine type always matches the engine vocabulary (no free-text flood or
// under-coverage from a value that matches no pattern).
func (h *IACEHandler) ListMachineTypes(c *gin.Context) {
	types := iace.MachineTypeVocabulary()
	c.JSON(http.StatusOK, gin.H{
		"machine_types": types,
		"total":         len(types),
	})
}
