// Command preview prints a single static TUI frame for screenshotting.
// Usage: preview <kind> [cols] [rows]
package main

import (
	"fmt"
	"os"
	"strconv"

	"github.com/charmbracelet/lipgloss"
	"github.com/correx/tui-go/internal/app"
	"github.com/muesli/termenv"
)

func main() {
	lipgloss.SetColorProfile(termenv.TrueColor)

	kind := "idle"
	if len(os.Args) > 1 {
		kind = os.Args[1]
	}
	cols, rows := 140, 36
	if len(os.Args) > 2 {
		cols, _ = strconv.Atoi(os.Args[2])
	}
	if len(os.Args) > 3 {
		rows, _ = strconv.Atoi(os.Args[3])
	}
	fmt.Print(app.PreviewFrame(kind, cols, rows))
}
