'use strict';

var index = require('./index-BEF5cZxd.js');
var template = require('./template-Cj6PcLmR.js');
var utils = require('./utils-NnC78QR3.js');
var sizes = require('./sizes-D5zsw2g5.js');
var props = require('./props-CPENhBnM.js');
require('./gov.log-C5EH15b_.js');

const BannerSizes = utils.pick(sizes.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) {
        index.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 = template.govHost(this.host);
    }
    validateSize(newValue) {
        props.validateProp(BannerSizes, newValue, BannerClass.root);
    }
    validateBackground(newValue) {
        props.validateProp(BannerBackground, newValue, BannerClass.root);
    }
    validateForeground(newValue) {
        props.validateProp(BannerForeground, newValue, BannerClass.root);
    }
    validateTextColor(newValue) {
        props.validateProp(BannerTextColor, newValue, BannerClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
        this.validateBackground(this.background);
        this.validateForeground(this.foreground);
        this.validateTextColor(this.textColor);
    }
    render() {
        return (index.h(index.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 })), index.h("div", { key: 'd5a59901f7a1a707c3679ffc20677163bbf31dc7' }, index.h("div", { key: '366d4ce913119a38f3166fdc70d9ae06181e7a5d', class: BannerClass.content }, index.h("slot", { key: '92baa67137573e91b5eb74884b2fa1cb68d5bf90', name: "headline" }), index.h("slot", { key: '2630dbd6c23e8ec71b136d76df977b0bef7aa830' })), this.h.hasSlot('button') && (index.h("slot", { key: '0e8b200648c9a4af27da49a5f725be48159ad595', name: "button" }))), index.h("slot", { key: '79bdb4c7d136d66561aab55012c8d5669503469f', name: "image" })));
    }
    get host() { return index.getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"],
        "background": ["validateBackground"],
        "foreground": ["validateForeground"],
        "text-color": ["validateTextColor"]
    }; }
};

exports.gov_banner = GovBanner;
//# sourceMappingURL=gov-banner.entry.cjs.js.map

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