package ui

import "strconv"

func buttonType(value string) string {
	if value == "" {
		return "button"
	}
	return value
}

func inputType(value string) string {
	if value == "" {
		return "text"
	}
	return value
}

func inputID(id string, name string) string {
	if id != "" {
		return id
	}
	return name
}

func textareaRows(rows int) string {
	if rows <= 0 {
		rows = 4
	}
	return strconv.Itoa(rows)
}
