import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';

const eclRatingFieldEcCss = ".ecl-rating-field.sc-ecl-rating-field-ec{display:inline-flex;flex-direction:row-reverse}.ecl-rating-field.sc-ecl-rating-field-ec .ecl-rating-field__input.sc-ecl-rating-field-ec:checked~.ecl-rating-field__label.sc-ecl-rating-field-ec .ecl-rating-field__icon-filled.sc-ecl-rating-field-ec,.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-ec:hover .ecl-rating-field__icon-filled.sc-ecl-rating-field-ec,.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-ec:hover~.ecl-rating-field__label.sc-ecl-rating-field-ec .ecl-rating-field__icon-filled.sc-ecl-rating-field-ec{display:inline-block}.ecl-rating-field.sc-ecl-rating-field-ec .ecl-rating-field__input.sc-ecl-rating-field-ec:checked~.ecl-rating-field__label.sc-ecl-rating-field-ec .ecl-rating-field__icon-outline.sc-ecl-rating-field-ec,.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-ec:hover .ecl-rating-field__icon-outline.sc-ecl-rating-field-ec,.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-ec:hover~.ecl-rating-field__label.sc-ecl-rating-field-ec .ecl-rating-field__icon-outline.sc-ecl-rating-field-ec{display:none}.ecl-rating-field__input.sc-ecl-rating-field-ec{border:0;clip:rect(0,0,0,0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled) .ecl-rating-field__input.sc-ecl-rating-field-ec:active~.ecl-rating-field__label.sc-ecl-rating-field-ec,.ecl-rating-field.sc-ecl-rating-field-ec:not(.ecl-rating-field--disabled) .ecl-rating-field__input.sc-ecl-rating-field-ec:focus~.ecl-rating-field__label.sc-ecl-rating-field-ec{outline:2px solid #004494}.ecl-rating-field__label.sc-ecl-rating-field-ec{cursor:pointer;margin-right:.5rem}.ecl-rating-field--disabled.sc-ecl-rating-field-ec .ecl-rating-field__label.sc-ecl-rating-field-ec{cursor:default}.ecl-rating-field__icon-filled.sc-ecl-rating-field-ec{display:none;fill:#ffd617}.ecl-rating-field__icon-outline.sc-ecl-rating-field-ec{fill:#707070}@media (min-width:480px){.ecl-rating-field__label.sc-ecl-rating-field-ec{margin-right:.25rem}}.ecl-rating-field.sc-ecl-rating-field-ec{margin-top:.75rem}.ecl-rating-field__icon-filled.sc-ecl-rating-field-ec{fill:#ffd617!important}.ecl-rating-field__icon-outline.sc-ecl-rating-field-ec{fill:#707070!important}.ecl-form-label__optional.sc-ecl-rating-field-ec{margin-inline-start:.5rem}.ecl-u-sr-only.sc-ecl-rating-field-ec{clip:rect(0,0,0,0)!important;border:0!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}";

const eclRatingFieldEuCss = ".ecl-rating-field.sc-ecl-rating-field-eu{display:inline-flex;flex-direction:row-reverse}.ecl-rating-field.sc-ecl-rating-field-eu .ecl-rating-field__input.sc-ecl-rating-field-eu:checked~.ecl-rating-field__label.sc-ecl-rating-field-eu .ecl-rating-field__icon-filled.sc-ecl-rating-field-eu,.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-eu:hover .ecl-rating-field__icon-filled.sc-ecl-rating-field-eu,.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-eu:hover~.ecl-rating-field__label.sc-ecl-rating-field-eu .ecl-rating-field__icon-filled.sc-ecl-rating-field-eu{display:inline-block}.ecl-rating-field.sc-ecl-rating-field-eu .ecl-rating-field__input.sc-ecl-rating-field-eu:checked~.ecl-rating-field__label.sc-ecl-rating-field-eu .ecl-rating-field__icon-outline.sc-ecl-rating-field-eu,.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-eu:hover .ecl-rating-field__icon-outline.sc-ecl-rating-field-eu,.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled)>.ecl-rating-field__label.sc-ecl-rating-field-eu:hover~.ecl-rating-field__label.sc-ecl-rating-field-eu .ecl-rating-field__icon-outline.sc-ecl-rating-field-eu{display:none}.ecl-rating-field__input.sc-ecl-rating-field-eu{border:0;clip:rect(0,0,0,0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled) .ecl-rating-field__input.sc-ecl-rating-field-eu:active~.ecl-rating-field__label.sc-ecl-rating-field-eu,.ecl-rating-field.sc-ecl-rating-field-eu:not(.ecl-rating-field--disabled) .ecl-rating-field__input.sc-ecl-rating-field-eu:focus~.ecl-rating-field__label.sc-ecl-rating-field-eu{outline:2px solid #0e47cb}.ecl-rating-field__label.sc-ecl-rating-field-eu{cursor:pointer;margin-right:.5rem}.ecl-rating-field--disabled.sc-ecl-rating-field-eu .ecl-rating-field__label.sc-ecl-rating-field-eu{cursor:default}.ecl-rating-field__icon-filled.sc-ecl-rating-field-eu{display:none;fill:#fc0}.ecl-rating-field__icon-outline.sc-ecl-rating-field-eu{fill:#707070}@media (min-width:480px){.ecl-rating-field__label.sc-ecl-rating-field-eu{margin-right:.25rem}}.ecl-rating-field.sc-ecl-rating-field-eu{margin-top:.75rem}.ecl-rating-field__icon-filled.sc-ecl-rating-field-eu{fill:#ffd617!important}.ecl-rating-field__icon-outline.sc-ecl-rating-field-eu{fill:#707070!important}.ecl-form-label__optional.sc-ecl-rating-field-eu{margin-inline-start:.5rem}.ecl-u-sr-only.sc-ecl-rating-field-eu{clip:rect(0,0,0,0)!important;border:0!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}";

const EclRatingField$1 = /*@__PURE__*/ proxyCustomElement(class EclRatingField extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        this.theme = 'ec';
        this.styleClass = undefined;
        this.disabled = false;
        this.required = false;
    }
    componentDidRender() {
        const stars = this.el.querySelectorAll('.ecl-rating-field__star');
        this.el.querySelector('.ecl-rating-field').innerHTML = '';
        this.el.querySelector('.ecl-rating-field').append(...stars);
    }
    getClass() {
        const styleClasses = [
            `ecl-rating-field`,
            this.styleClass
        ];
        if (this.disabled) {
            styleClasses.push('ecl-rating-field--disabled');
        }
        return styleClasses.join(' ');
    }
    render() {
        return (h("div", { class: this.getClass() }, h("slot", null)));
    }
    get el() { return this; }
    static get style() { return {
        ec: eclRatingFieldEcCss,
        eu: eclRatingFieldEuCss
    }; }
}, [38, "ecl-rating-field", {
        "theme": [1],
        "styleClass": [1, "style-class"],
        "disabled": [4],
        "required": [4]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["ecl-rating-field"];
    components.forEach(tagName => { switch (tagName) {
        case "ecl-rating-field":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, EclRatingField$1);
            }
            break;
    } });
}

const EclRatingField = EclRatingField$1;
const defineCustomElement = defineCustomElement$1;

export { EclRatingField, defineCustomElement };

//# sourceMappingURL=ecl-rating-field.js.map