import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ClISz4NF.js';
import { v as validateAccessibleLabel } from './wcag-CD6_13JO.js';
import { c as canValidateWcagOnRender } from './gov.log-BtqD9K8d.js';
import { g as govHost } from './template-CoD1xawt.js';
import { t as tick } from './stencil.utils-Cjg0wpDG.js';
import './string.utils-vN03FcXN.js';
import './helpers.types-DNztiAH0.js';
import './utils-CQvUntGY.js';

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

const GovBackdrop = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.govClick = 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 = govHost(this.host);
    }
    async componentDidRender() {
        if (canValidateWcagOnRender()) {
            tick(() => this.validateAccessibility());
        }
    }
    render() {
        return (h(Host, { key: 'a86624d0cdaf83455d71298e609324fed9cd19bd', class: this.h.classes(BackdropClass.root), inverse: this.inverse }, 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() {
        validateAccessibleLabel(this.accessibleLabel, this.accessibleLabelledBy, BackdropClass.root, this.host);
    }
    get host() { return getElement(this); }
};

export { GovBackdrop as gov_backdrop };
//# sourceMappingURL=gov-backdrop.entry.js.map

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