using Gtk 4.0;
using Adw 1;

template $PipeTapUiMainBar: $PipeTapUiFloatingWindow {
    title: _("PipeTap");
    window-name: "main-controls";

    content: Gtk.Box {
        orientation: bind template.orientation;
        halign: fill;
        homogeneous: true;

        styles [
            "linked",
        ]

        Gtk.ToggleButton focus {
            icon-name: "camera-focus-symbolic";
            tooltip-text: _("Focus");

            styles [
                "flat",
            ]
        }

        Gtk.ToggleButton contrast {
            icon-name: "color-symbolic";
            tooltip-text: _("Contrast");

            styles [
                "flat",
            ]
        }

        Gtk.ToggleButton exposure {
            icon-name: "camera-iso-symbolic";
            tooltip-text: _("Exposure");

            styles [
                "flat",
            ]
        }

        Gtk.MenuButton {
            primary: true;
            icon-name: "open-menu-symbolic";
            tooltip-text: _("Main Menu");
            menu-model: primary_menu;

            styles [
                "flat",
            ]
        }
    };
}

menu primary_menu {
    section {
        item {
            label: _("_Preferences");
            action: "app.preferences";
        }

        /*
        item {
            label: _("_Keyboard Shortcuts");
            action: "win.show-help-overlay";
        }
        */
        item {
            label: _("_About PipeTap");
            action: "app.about";
        }

        item {
            label: _("Quit");
            action: "app.quit";
        }
    }
}
