'use strict';

var index = require('./index-BEF5cZxd.js');
var wcag = require('./wcag-Bvzxnp5D.js');
var gov_log = require('./gov.log-C5EH15b_.js');
var template = require('./template-Cj6PcLmR.js');
var stencil_utils = require('./stencil.utils-8sCYbm34.js');
require('./string.utils-BG4pUfEi.js');
require('./helpers.types-vap8QfRH.js');
require('./utils-NnC78QR3.js');

const BackdropClass = {
    root: 'gov-backdrop',
    bg: 'gov-backdrop__background',
};

const GovBackdrop = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.govClick = index.createEvent(this, "gov-click");
        /**
         * Determine if component should have inverse colors to be used on dark background.
         */
        this.inverse = false;
        /**
         * Makes the backdrop component disabled.
         */
        this.disabled = false;
        this.h = template.govHost(this.host);
    }
    async componentDidRender() {
        if (gov_log.canValidateWcagOnRender()) {
            stencil_utils.tick(() => this.validateAccessibility());
        }
    }
    render() {
        return (index.h(index.Host, { key: 'a86624d0cdaf83455d71298e609324fed9cd19bd', class: this.h.classes(BackdropClass.root), inverse: this.inverse }, index.h("div", { key: 'fb299b51c9e2e2dbc0093a8a365e98dabcfc6e8c', role: 'button', "aria-disabled": this.disabled, "aria-label": this.accessibleLabel, "aria-labelledby": this.accessibleLabelledBy, onClick: e => {
                if (!this.disabled) {
                    this.govClick.emit(e);
                }
            }, class: BackdropClass.bg })));
    }
    /**
     * Validate the accessibility attributes of the component
     */
    async validateAccessibility() {
        wcag.validateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host);
    }
    get host() { return index.getElement(this); }
};

exports.gov_backdrop = GovBackdrop;
//# sourceMappingURL=gov-backdrop.entry.cjs.js.map

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