package fields import ( "fmt" tea "github.com/charmbracelet/bubbletea" ) type ComputeModel struct { Label string description string value string } func NewComputeModel(label, value, description string) *ComputeModel { return &ComputeModel{ Label: label, description: description, value: value, } } func (m *ComputeModel) Init() tea.Cmd { return nil } func (m *ComputeModel) Update(msg tea.Msg) (FieldModel, tea.Cmd) { return m, nil } func (m *ComputeModel) View() string { res := fmt.Sprintf("%s: %s", m.Label, m.value) if m.description != "" { res += fmt.Sprintf("\n%s", m.description) } return res } func (m *ComputeModel) Focus() {} func (m *ComputeModel) Blur() { } func (m *ComputeModel) CaptureKeys() bool { return false } func (m *ComputeModel) GetLabel() string { return m.Label } func (m *ComputeModel) GetValue() interface{} { return m.value }