'use strict';

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

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

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

exports.gov_loading = GovLoading;
//# sourceMappingURL=gov-loading.entry.cjs.js.map

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