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

const LoadingSizes = pick(Sizes, ['_S', '_M', '_L']);
const LoadingClass = {
    root: 'gov-loading',
    content: 'gov-loading__content',
    icon: 'gov-loading__icon',
};

const GovLoading = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Loading size
         */
        this.size = 'm';
        this.h = govHost(this.host);
    }
    validateSize(newValue) {
        validateProp(LoadingSizes, newValue, LoadingClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
    }
    render() {
        return (h(Host, { key: '633a5908dcace7298026f28a9cd7e8cf7580ae3e', class: this.h.classes(LoadingClass.root), size: this.size }, h("div", { key: '39027a3ed4b2284070fe7f6954ec3864222b57aa', class: LoadingClass.content }, h("gov-icon", { key: '6baa68d8626e7b271eec0c6990b5999849a23fd5', class: prepareClasses([LoadingClass.icon, "gov-spin-animation"]), name: "loader", type: "components" }), h("slot", { key: 'c9179dc3e6de4cb6ce2da35b9b81dc16fc2fda67' })), h("gov-backdrop", { key: 'ca4fe88eb06122df18b717d008b7520724efd64e', inverse: true })));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"]
    }; }
};

export { GovLoading as gov_loading };
//# sourceMappingURL=gov-loading.entry.js.map

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