import { Button, VerticalBox, ScrollView } from "std-widgets.slint";
export global VruData {
    in-out property <[string]> words;
}

export component VruDialog inherits Window {
    title: @tr("What Would You Like To Say?");
    preferred-width: 400px;
    preferred-height: 400px;
    callback vru_button_clicked(string);
    in-out property words <=> VruData.words;

    ScrollView {
        mouse-drag-pan-enabled: true;
        VerticalBox {
            padding-bottom: 40px;
            for word[i] in words: Button {
                text: word;
                clicked => {
                    vru_button_clicked(self.text);
                }
            }
        }
    }
}
