// Quick test that TUI builtins work without launching the event loop

fn main() {
    ui_app("Lair Editor Test")
    println("App created")

    ui_tab_editor("Code Chamber", "code", "fn main() \{\n    println(\"hello\")\n\}")
    println("Editor tab added")

    let headers = array_new()
    headers = array_push(headers, "Prompt")
    headers = array_push(headers, "Response")
    ui_tab_data("Dataset Chamber", "data", headers)
    println("Data tab added")

    let row = array_new()
    row = array_push(row, "Hello!")
    row = array_push(row, "Hi there!")
    ui_data_add_row("data", row)
    println("Row added")

    ui_tab_terminal("Terminal", "term")
    println("Terminal tab added")

    ui_status("Test complete")
    println("Status set")

    let code = ui_get_text("code")
    println("Editor content: " + code)

    println("Nexus enabled: ")
    let n = ui_nexus()
    println(n)

    println("All TUI builtins working!")
}
