Files
nebara-tui/internal/app/state.go
T
2026-10-13 19:36:58 +07:00

29 lines
742 B
Go

// Package app wires together the Nebara OS TUI application.
package app
import (
"github.com/nebara/nebara-os/internal/mock"
"github.com/nebara/nebara-os/internal/model"
"github.com/nebara/nebara-os/internal/ui/navigation"
)
// State holds the complete runtime state of the TUI application.
type State struct {
Appliance model.ApplianceInfo
Message *model.SystemMessage
Navigator *navigation.Navigator
ShowModal bool
ModalLabel string
ShowHelp bool
}
// NewStateFromMock constructs application state from a mock scenario.
func NewStateFromMock(s mock.State) *State {
nav := navigation.NewNavigator(model.MainMenu(), s.InitialMenu)
return &State{
Appliance: s.Appliance,
Message: s.Message,
Navigator: nav,
}
}