using Gtk 4.0;
using Adw 1;

Adw.Window _root {
  default-width: 500;
  modal: true;
  resizable: false;
  
  content: Adw.ToolbarView {
    [top]
    Adw.HeaderBar {
      title-widget: Gtk.Label {};
    }

    Gtk.WindowHandle {
      Gtk.Box {
        orientation: vertical;
        spacing: 24;
        margin-start: 24;
        margin-end: 24;

        Gtk.Image {
          icon-name: "dialog-password-symbolic";
          pixel-size: 128;

          styles ["dim-label"]
        }

        Gtk.Label {
          label: _("Enter Password To Login:");
          wrap: true;
          justify: center;

          styles ["title-1"]
        }

        Gtk.Label _filenameLabel {
          wrap: true;
          justify: center;
        }

        Adw.PasswordEntryRow _passwordEntry {
          title: _("Password");
          activates-default: true;

          styles ["card"]
        }

        Gtk.Button _unlockButton {
          halign: center;
          valign: center;
          margin-top: 24;
          margin-bottom: 24;
          label: _("Unlock");

          styles ["pill", "suggested-action"]
        }
      }
    }
  };
  
  Gtk.ShortcutController {
    Gtk.Shortcut {
      trigger: "Escape";
      action: "action(window.close)";
    }
  }

  default-widget: _unlockButton;
}