using Gtk 4.0;
using Adw 1;
using Shumate 1.0;

template $ShumateDemoWindow: Adw.ApplicationWindow {
    can-focus: true;
    title: bind template.my-property; // This is a comment in blueprint.
    default-width: 800;
    default-height: 600;

    [titlebar]
    HeaderBar {
        DropDown layers_dropdown <beginfold id='1'>{</beginfold id='1'>
            notify::selected => $_on_layers_dropdown_notify_selected() swapped;
        <endfold id='1'>}</endfold id='1'>
    <endfold id='1'>}</endfold id='1'>

    Overlay overlay <beginfold id='1'>{</beginfold id='1'>
        vexpand: true;

        Shumate.Map map <beginfold id='1'>{</beginfold id='1'><endfold id='1'>}</endfold id='1'>

        [overlay]
        Shumate.Scale scale <beginfold id='1'>{</beginfold id='1'>
            halign: start;
            valign: end;
        <endfold id='1'>}</endfold id='1'>

        [overlay]
        Box {
            visible: bind $_get_box_visible(map.visible) as <bool>;
            halign: center;
            valign: center;
            orientation: horizontal;

            Shumate.Compass compass <beginfold id='1'>{</beginfold id='1'>
                halign: end;
                map: map;
            <endfold id='1'>}</endfold id='1'>

            Shumate.License license <beginfold id='1'>{</beginfold id='1'>
                halign: bind compass.halign inverted;
            <endfold id='1'>}</endfold id='1'>

            Label {
                label: _("This Widget Was Written In Blueprint!");

                styles [
                    "title-1",
                    "success",
                ]
            <endfold id='1'>}</endfold id='1'>

            Button {
                label: _("Press To Squeak :3");
                clicked => $_on_button_clicked();

                styles [
                    "suggested-action",
                    "pill",
                ]
            <endfold id='1'>}</endfold id='1'>
        <endfold id='1'>}</endfold id='1'>
    <endfold id='1'>}</endfold id='1'>
<endfold id='1'>}</endfold id='1'>
