import { Codicon } from "../../../base/common/codicons.mjs";
import Severity from "../../../base/common/severity.mjs";
import { problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground } from "../../theme/common/colorRegistry.mjs";
import { registerThemingParticipant } from "../../theme/common/themeService.mjs";
var SeverityIcon;
(function(SeverityIcon2) {
  function className(severity) {
    switch (severity) {
      case Severity.Ignore:
        return "severity-ignore " + Codicon.info.classNames;
      case Severity.Info:
        return Codicon.info.classNames;
      case Severity.Warning:
        return Codicon.warning.classNames;
      case Severity.Error:
        return Codicon.error.classNames;
      default:
        return "";
    }
  }
  SeverityIcon2.className = className;
})(SeverityIcon || (SeverityIcon = {}));
registerThemingParticipant((theme, collector) => {
  const errorIconForeground = theme.getColor(problemsErrorIconForeground);
  if (errorIconForeground) {
    const errorCodiconSelector = 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(problemsWarningIconForeground);
  if (warningIconForeground) {
    const warningCodiconSelector = 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(problemsInfoIconForeground);
  if (infoIconForeground) {
    const infoCodiconSelector = 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};
			}
		`);
  }
});
export {
  SeverityIcon
};
