/*
Copyright 2022 0xf8
This file is part of Galerie
Galerie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Galerie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Galerie. If not, see .
*/
import App from "./app";
import React from "react";
import jQuery from "jquery";
const $ = jQuery;
import Settings, { apiUrl } from "./settings";
const settings = new Settings();
let global_ActiveContextMenu: ContextMenu = null;
let global_ActivePopout: Popout = null;
// ===================
// === ContextMenu ===
// ===================
class ContextMenu {
public menu: JQuery;
private overlay: JQuery;
constructor(label: string, buttons: JQuery[], position: [any, any]) {
this.overlay = $("");
this.menu = $("