import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { B as BEM } from './bem.js';

const balNoticesCss = ".bal-notices{position:fixed !important;display:-ms-flexbox !important;display:flex !important;top:0 !important;bottom:0 !important;left:0 !important;right:0 !important;padding-top:1rem !important;padding-bottom:1rem !important;margin:0 !important;overflow:hidden !important;z-index:var(--bal-z-index-toast) !important;pointer-events:none !important;-ms-flex-direction:column !important;flex-direction:column !important}.bal-notices--container{-ms-flex-align:center !important;align-items:center !important}.bal-notices:not(.bal-notices--container){padding-left:1rem !important;padding-right:1rem !important}.bal-notices__inner{display:-ms-flexbox;display:flex;gap:.5rem}.bal-notices__inner--snackbar{height:100vh;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:end;align-items:flex-end;-ms-flex-direction:column;flex-direction:column;margin:.5em}.bal-notices__inner--snackbar .bal-snackbar{-ms-flex-pack:end;justify-content:flex-end;-ms-flex-item-align:end;align-self:flex-end;pointer-events:auto !important}.bal-notices__inner--toast{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;margin:.5em}.bal-notices__inner--toast .bal-toast{-ms-flex-pack:center;justify-content:center;-ms-flex-item-align:center;align-self:center;pointer-events:auto !important}.bal-notices__inner.container{--bal-toast-width:100%;--bal-toast-width-tablet:100%;--bal-toast-width-desktop:100%}.bal-notices--animated .bal-toast{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:slideInDown;animation-name:slideInDown}.bal-notices--animated .bal-snackbar{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);visibility:visible}to{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}";

const Notices = /*@__PURE__*/ proxyCustomElement(class Notices extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        /**
         * @internal Tells if the notice is animated
         */
        this.animated = true;
        /**
         * @internal The interface tells the notice where to show the notice.
         */
        this.interface = 'toast';
        /**
         * @internal Sets the content content width with the regular container classes
         */
        this.container = undefined;
    }
    render() {
        const block = BEM.block('notices');
        const innerEl = block.element('inner');
        const hasContainer = this.interface === 'toast' && this.container !== undefined;
        return (h(Host, { key: '83c73f66abe9dc3abf4181c43af09fc4ce7f3b7a', class: Object.assign(Object.assign(Object.assign({ 'bal-app': true }, block.class()), block.modifier('container').class(hasContainer)), block.modifier('animated').class(this.animated)) }, h("div", { key: 'f16cd17c52f0df45500e9be985fc099c5c134cf6', class: Object.assign(Object.assign(Object.assign({}, innerEl.class()), innerEl.modifier(this.interface).class()), { container: hasContainer, [`is-${this.container}`]: hasContainer && this.container !== '' }) }, h("slot", { key: 'bdf0fc55a2b9d63fed14821e8e83553394052ac2' }))));
    }
    static get style() { return balNoticesCss; }
}, [260, "bal-notices", {
        "animated": [4],
        "interface": [1],
        "container": [1]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["bal-notices"];
    components.forEach(tagName => { switch (tagName) {
        case "bal-notices":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, Notices);
            }
            break;
    } });
}

const BalNotices = Notices;
const defineCustomElement = defineCustomElement$1;

export { BalNotices, defineCustomElement };
