#!/usr/bin/env gjs

const Gtk = imports.gi.Gtk;

Gtk.init(null);

let win = new Gtk.Window();
let box = new Gtk.Box();
let menuButton = new Gtk.MenuButton();
let popover = new Gtk.Popover();
let menuButton2 = new Gtk.MenuButton();
let popover2 = new Gtk.Popover();

popover.visible = false;

menuButton.popover = popover;
menuButton.direction = Gtk.ArrowType.UP;
menuButton.visible = true;

menuButton2.visible = true;
menuButton2.popover = popover2;

popover.add(menuButton2);
popover2.visible = false;

box.visible = true;
box.orientation = Gtk.Orientation.VERTICAL;
box.pack_end(menuButton, false, false, 0);
win.add(box);

win.set_size_request(300, 300);
win.show();
Gtk.main();
