"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const codicons = require("../../../base/common/codicons.js");
const severity = require("../../../base/common/severity.js");
const colorRegistry = require("../../theme/common/colorRegistry.js");
const themeService = require("../../theme/common/themeService.js");
exports.SeverityIcon = void 0;
(function(SeverityIcon) {
  function className(severity$1) {
    switch (severity$1) {
      case severity.default.Ignore:
        return "severity-ignore " + codicons.Codicon.info.classNames;
      case severity.default.Info:
        return codicons.Codicon.info.classNames;
      case severity.default.Warning:
        return codicons.Codicon.warning.classNames;
      case severity.default.Error:
        return codicons.Codicon.error.classNames;
      default:
        return "";
    }
  }
  SeverityIcon.className = className;
})(exports.SeverityIcon || (exports.SeverityIcon = {}));
themeService.registerThemingParticipant((theme, collector) => {
  const errorIconForeground = theme.getColor(colorRegistry.problemsErrorIconForeground);
  if (errorIconForeground) {
    const errorCodiconSelector = codicons.Codicon.error.cssSelector;
    collector.addRule(`
			.monaco-editor .zone-widget ${errorCodiconSelector},
			.markers-panel .marker-icon${errorCodiconSelector},
			.text-search-provider-messages .providerMessage ${errorCodiconSelector},
			.extensions-viewlet > .extensions ${errorCodiconSelector} {
				color: ${errorIconForeground};
			}
		`);
  }
  const warningIconForeground = theme.getColor(colorRegistry.problemsWarningIconForeground);
  if (warningIconForeground) {
    const warningCodiconSelector = codicons.Codicon.warning.cssSelector;
    collector.addRule(`
			.monaco-editor .zone-widget ${warningCodiconSelector},
			.markers-panel .marker-icon${warningCodiconSelector},
			.extensions-viewlet > .extensions ${warningCodiconSelector},
			.extension-editor ${warningCodiconSelector},
			.text-search-provider-messages .providerMessage ${warningCodiconSelector},
			.preferences-editor ${warningCodiconSelector} {
				color: ${warningIconForeground};
			}
		`);
  }
  const infoIconForeground = theme.getColor(colorRegistry.problemsInfoIconForeground);
  if (infoIconForeground) {
    const infoCodiconSelector = codicons.Codicon.info.cssSelector;
    collector.addRule(`
			.monaco-editor .zone-widget ${infoCodiconSelector},
			.markers-panel .marker-icon${infoCodiconSelector},
			.extensions-viewlet > .extensions ${infoCodiconSelector},
			.text-search-provider-messages .providerMessage ${infoCodiconSelector},
			.extension-editor ${infoCodiconSelector} {
				color: ${infoIconForeground};
			}
		`);
  }
});
