import { r as registerInstance, h, H as Host, g as getElement } from './index-ClISz4NF.js';
import { g as govHost } from './template-CoD1xawt.js';
import { p as pick } from './utils-CQvUntGY.js';
import { S as Sizes } from './sizes-BcQO4NH2.js';
import { v as validateProp } from './props-CJZgTDla.js';
import './gov.log-BtqD9K8d.js';

const BannerSizes = pick(Sizes, ['_S', '_M', '_L', '_XL']);
var BannerBackground;
(function (BannerBackground) {
    BannerBackground["SIMPLE"] = "simple";
    BannerBackground["WAVES"] = "waves";
    BannerBackground["STRIPES"] = "stripes";
    BannerBackground["LINES"] = "lines";
})(BannerBackground || (BannerBackground = {}));
var BannerForeground;
(function (BannerForeground) {
    BannerForeground["IMAGE"] = "image";
    BannerForeground["LOGO"] = "logo";
    BannerForeground["ICON"] = "icon";
})(BannerForeground || (BannerForeground = {}));
var BannerTextColor;
(function (BannerTextColor) {
    BannerTextColor["LIGHT"] = "light";
    BannerTextColor["DARK"] = "dark";
})(BannerTextColor || (BannerTextColor = {}));
const BannerClass = {
    root: 'gov-banner',
    content: 'gov-banner__content',
};

const GovBanner = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Banner’s size.
         */
        this.size = BannerSizes._M;
        /**
         * Banner’s background
         */
        this.background = BannerBackground.SIMPLE;
        /**
         * Banner’s foreground
         */
        this.foreground = BannerForeground.LOGO;
        /**
         * XL Banner’s text color
         */
        this.textColor = BannerTextColor.LIGHT;
        this.h = govHost(this.host);
    }
    validateSize(newValue) {
        validateProp(BannerSizes, newValue, BannerClass.root);
    }
    validateBackground(newValue) {
        validateProp(BannerBackground, newValue, BannerClass.root);
    }
    validateForeground(newValue) {
        validateProp(BannerForeground, newValue, BannerClass.root);
    }
    validateTextColor(newValue) {
        validateProp(BannerTextColor, newValue, BannerClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
        this.validateBackground(this.background);
        this.validateForeground(this.foreground);
        this.validateTextColor(this.textColor);
    }
    render() {
        return (h(Host, Object.assign({ key: 'c035b04b0715ffcc996d66a1f673d1bd9518284c', class: this.h.classes(BannerClass.root), role: "region", size: this.size }, (this.size !== "xl" ? {
            background: this.background,
            foreground: this.foreground
        } : { 'text-color': this.textColor })), h("div", { key: 'd5a59901f7a1a707c3679ffc20677163bbf31dc7' }, h("div", { key: '366d4ce913119a38f3166fdc70d9ae06181e7a5d', class: BannerClass.content }, h("slot", { key: '92baa67137573e91b5eb74884b2fa1cb68d5bf90', name: "headline" }), h("slot", { key: '2630dbd6c23e8ec71b136d76df977b0bef7aa830' })), this.h.hasSlot('button') && (h("slot", { key: '0e8b200648c9a4af27da49a5f725be48159ad595', name: "button" }))), h("slot", { key: '79bdb4c7d136d66561aab55012c8d5669503469f', name: "image" })));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"],
        "background": ["validateBackground"],
        "foreground": ["validateForeground"],
        "text-color": ["validateTextColor"]
    }; }
};

export { GovBanner as gov_banner };
//# sourceMappingURL=gov-banner.entry.js.map

//# sourceMappingURL=gov-banner.entry.js.map