package widget

// Widget type constants
const (
	WidgetTypeGeneric = 0
	WidgetTypeDoor    = 1
	WidgetTypeLift    = 2
)

// Widget state constants
const (
	WidgetStateClosed = 0
	WidgetStateOpen   = 1
)

// Default widget values
const (
	DefaultOpenHeading    = -1
	DefaultClosedHeading  = -1
	DefaultOpenDuration   = 0
	DefaultActivityOpen   = 0
	DefaultActivityClosed = 64
)

// Widget type names for display
var WidgetTypeNames = map[int8]string{
	WidgetTypeGeneric: "Generic",
	WidgetTypeDoor:    "Door",
	WidgetTypeLift:    "Lift",
}

// GetWidgetTypeNameByTypeID returns the display name for a widget type
func GetWidgetTypeNameByTypeID(typeID int8) string {
	if name, exists := WidgetTypeNames[typeID]; exists {
		return name
	}
	return "Generic"
}
