import { Button, VerticalBox } from "std-widgets.slint";

export component Demo {
    in-out property <int> counter: 0;

    VerticalBox {
        Text {
            text: "Counter: \{root.counter}";
            font-size: 24px;
        }

        Button {
            text: "Increment";
            clicked => {
                root.counter += 1;
            }
        }

        Button {
            text: "Decrement";
            clicked => {
                root.counter -= 1;
            }
        }

        Button {
            text: "Reset";
            clicked => {
                root.counter = 0;
            }
        }
    }
}