using Gtk 4.0;
using Adw 1;
translation-domain "com.mitchellh.ghostty";

Adw.AlertDialog clipboard_confirmation_window {
  heading: _("Authorize Clipboard Access");
  body: _("An application is attempting to read from the clipboard. The current clipboard contents are shown below.");

  responses [
    cancel: _("Deny") suggested,
    ok: _("Allow") destructive,
  ]

  default-response: "cancel";
  close-response: "cancel";

  extra-child: ListBox {
    selection-mode: none;

    styles [
      "boxed-list-separate",
    ]

    Overlay {
      styles [
        "osd",
        "clipboard-overlay",
      ]

      ScrolledWindow text_view_scroll {
        width-request: 500;
        height-request: 200;

        TextView text_view {
          cursor-visible: false;
          editable: false;
          monospace: true;
          top-margin: 8;
          left-margin: 8;
          bottom-margin: 8;
          right-margin: 8;

          styles [
            "clipboard-content-view",
          ]
        }
      }

      [overlay]
      Button reveal_button {
        visible: false;
        halign: end;
        valign: start;
        margin-end: 12;
        margin-top: 12;

        Image {
          icon-name: "view-reveal-symbolic";
        }
      }

      [overlay]
      Button hide_button {
        visible: false;
        halign: end;
        valign: start;
        margin-end: 12;
        margin-top: 12;

        styles [
          "opaque",
        ]

        Image {
          icon-name: "view-conceal-symbolic";
        }
      }
    }

    Adw.SwitchRow remember_choice {
      title: _("Remember choice for this split");
      subtitle: _("Reload configuration to show this prompt again");
    }
  };
}
