using Gtk 4.0;
using Adw 1;

Adw.Window _root {
  default-width: 400;
  modal: true;
  resizable: false;

  content: Adw.ToolbarView {
    [top]
    Adw.HeaderBar {
      title-widget: Gtk.Label { };

      [start]
      Gtk.Button _helpButton {
        icon-name: "dialog-question-symbolic";
        tooltip-text: _("Help");

        styles ["flat"]
      }

      styles ["flat"]
    }

    content: Gtk.WindowHandle {
      Gtk.Box {
        orientation: vertical;

        Gtk.Label {
          label: _("Corrupted Files Found");
          styles ["title-2"]
        }
      
        Gtk.Label {
          label: _("This music folder contains music files that have corrupted tags. The following files are affected and will be ignored by Tagger:");
          wrap: true;
          margin-top: 24;
          margin-start: 12;
          margin-end: 12;
          margin-bottom: 24;
          justify: center;
        }

        Gtk.Separator {}
      
        Gtk.ScrolledWindow _scrolledWindow {
          propagate-natural-height: true;
          max-content-height: 300;

          child: Adw.PreferencesGroup _filesGroup {
            margin-top: 12;
            margin-start: 12;
            margin-end: 12;
            margin-bottom: 12;
          };
          
          styles ["view"]
        }
      }
    };
  };

  Gtk.ShortcutController {
    Gtk.Shortcut {
      trigger: "Escape";
      action: "action(window.close)";
    }
  }
}