// Test fixture matching the native-hello App.el patterns. // This is what a developer would write in component syntax; // the codegen should produce code equivalent to what's in // examples/native-hello/src/App.el. component App { state { greeting: String = "Waiting for name..." counter: Int = 0 } fn on_greet_click(widget: Int, data: String) -> Void { let name: String = widget_get_text(g_input) let greeting: String = if str_len(name) > 0 { str_concat(str_concat("Hello, ", name), "!") } else { "Hello, World!" } widget_set_text(g_label, greeting) } fn on_counter_click(widget: Int, data: String) -> Void { state.counter = state.counter + 1 widget_set_text(g_counter_lbl, str_concat("Clicks: ", int_to_str(g_counter))) } fn on_name_change(widget: Int, data: String) -> Void { let has_text: Bool = str_len(data) > 0 widget_set_disabled(g_button, !has_text) } template {