"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseAlertStatusIcon = BaseAlertStatusIcon;
exports.baseAlertStatusToDataColor = baseAlertStatusToDataColor;
const react_1 = __importDefault(require("react"));
const aksel_icons_1 = require("@navikt/aksel-icons");
function baseAlertStatusToDataColor(status) {
    switch (status) {
        case "announcement":
            return "neutral";
        case "success":
            return "success";
        case "warning":
            return "warning";
        case "error":
            return "danger";
    }
    return "neutral";
}
const STATUS_ICONS = {
    announcement: {
        fill: aksel_icons_1.MegaphoneSpeakingFillIcon,
        outline: aksel_icons_1.MegaphoneSpeakingIcon,
    },
    success: {
        fill: aksel_icons_1.CheckmarkCircleFillIcon,
        outline: aksel_icons_1.CheckmarkCircleIcon,
    },
    warning: {
        fill: aksel_icons_1.ExclamationmarkTriangleFillIcon,
        outline: aksel_icons_1.ExclamationmarkTriangleIcon,
    },
    error: {
        fill: aksel_icons_1.XMarkOctagonFillIcon,
        outline: aksel_icons_1.XMarkOctagonIcon,
    },
};
function BaseAlertStatusIcon({ status, fill = true, }) {
    if (!status) {
        return null;
    }
    const Icon = fill ? STATUS_ICONS[status].fill : STATUS_ICONS[status].outline;
    return react_1.default.createElement(Icon, { "aria-hidden": true });
}
//# sourceMappingURL=BaseAlertRoot.utils.js.map