package constants

// Profile IDs - sourced from shared/constants/system.json
// Run `./scripts/typegen.sh` to regenerate after modifying system.json
const (
	ProfileSystemAdmin  = "system_admin"
	ProfileStandardUser = "standard_user"
)

// IsSystemAdmin checks if a profile ID is the system admin profile
func IsSystemAdmin(profileID string) bool {
	return profileID == ProfileSystemAdmin
}

// ProfileDisplayName returns the display name for a known profile ID.
// Returns the ID itself as fallback for unknown/custom profiles.
var profileNames = map[string]string{
	ProfileSystemAdmin:  "System Administrator",
	ProfileStandardUser: "Standard User",
}

func ProfileDisplayName(profileID string) string {
	if name, ok := profileNames[profileID]; ok {
		return name
	}
	return profileID
}

// IsSuperUser checks if a profile ID has super user privileges
func IsSuperUser(profileID string) bool {
	return profileID == ProfileSystemAdmin
}

// User Defaults
const (
	DefaultNewUserProfileID = ProfileStandardUser
)
