package main

import (
	"get-container/cmd/hytop/tui"
	"log"
	"os"

	tea "github.com/charmbracelet/bubbletea"
	"github.com/charmbracelet/x/term"
)

func main() {
	w, h, err := term.GetSize(os.Stdout.Fd())
	if err != nil {
		log.Fatalf("error get terminal size: %v", err)
	}
	model := tui.NewModelMain(w, h)
	if _, err := tea.NewProgram(&model, tea.WithAltScreen()).Run(); err != nil {
		log.Fatalf("error create program; %v", err)
	}
	os.Exit(0)
}
