import { h } from "@stencil/core";
import { badge, badgePrimary, badgeSecondary, badgeSuccess, badgeDanger, badgeWarning, badgeInfo, badgeLight, badgeDark, } from "../../styles/parts";
export var BadgeVariant;
(function (BadgeVariant) {
    BadgeVariant["PRIMARY"] = "primary";
    BadgeVariant["SECONDARY"] = "secondary";
    BadgeVariant["SUCCESS"] = "success";
    BadgeVariant["DANGER"] = "danger";
    BadgeVariant["WARNING"] = "warning";
    BadgeVariant["INFO"] = "info";
    BadgeVariant["LIGHT"] = "light";
    BadgeVariant["DARK"] = "dark";
})(BadgeVariant || (BadgeVariant = {}));
export const Badge = (props) => {
    const { variant, text, title } = props;
    const cssClasses = {
        default: 'badge',
        primary: 'badge bg-primary',
        secondary: 'badge bg-secondary',
        success: 'badge bg-success',
        danger: 'badge bg-danger',
        warning: 'badge bg-warning',
        info: 'badge bg-info',
        light: 'badge bg-light',
        dark: 'badge bg-dark',
    };
    const badgeVariant = {
        default: badge,
        primary: badgePrimary,
        secondary: badgeSecondary,
        success: badgeSuccess,
        danger: badgeDanger,
        warning: badgeWarning,
        info: badgeInfo,
        light: badgeLight,
        dark: badgeDark,
    };
    return (h("span", { class: cssClasses[variant] || cssClasses.default, part: badgeVariant[variant] || badgeVariant.default, title: title }, text));
};
