(function (paw, utils, _super, SysInfoComponent) {
  paw.lang.extend(SysInfoPopup, _super);
  function SysInfoPopup(sysInfo, auth, additionalData, localization) {
    _super.call(this, "sys-info-popup", {
      title: localization.versionInfoTitle,
      Component: SysInfoComponent,
      styleClass: "paw-sys-info-popup",
      bind: {
        sysInfo: sysInfo,
        auth: auth,
        additionalData: additionalData,
        localization: paw.lang.append(
          {
            filters: "@Loc.Filters",
            clear: "@Loc.Clear",
            searchFind: "@Loc.SearchFind",
          },
          localization || {}
        ),
      },
      maximizable: false,
      draggable: false,
    });
  }

  SysInfoPopup.open = function (basePath, auth, localization, additionalData) {
    return utils.async.get(basePath + "/api/v2/sys-info").then(function (sysInfo) {
      var popup = new SysInfoPopup(
        JSON.parse(sysInfo),
        auth,
        additionalData,
        localization
      );
      popup.show();
    });
  };

  paw.com.sysInfo.SysInfoPopup = SysInfoPopup;
})(paw, paw.utils, paw.com.Popup, paw.com.sysInfo.SysInfoComponent);
