package app

import (
	
)

// Text returns a UI element representing plain text, converting the provided
// value to its string representation.
func ( any) UI {
	return &text{value: toString()}
}

// Textf returns a UI element representing formatted text. The format and values
// follow the conventions of fmt.Sprintf.
func ( string,  ...any) UI {
	return &text{value: fmt.Sprintf(, ...)}
}

type text struct {
	jsvalue       Value
	parentElement UI
	value         string
}

func ( *text) () Value {
	return .jsvalue
}

func ( *text) () bool {
	return .jsvalue != nil
}

func ( *text) () UI {
	return .parentElement
}

func ( *text) ( UI) UI {
	.parentElement = 
	return 
}