"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7326,8019],{8273:(e,t,n)=>{n.r(t),n.d(t,{NotificationClass:()=>s,componentName:()=>c}),n(18983);var o=n(97810);const i=window.customElements.get("vaadin-notification-container");if(!i)throw new Error("could not get vaadin-notification-container class");customElements.define((0,o.xE)("notification-container"),class extends i{}),n(69182);var r=n(9696),a=n(79365);const c=(0,o.xE)("notification"),s=(0,r.Zz)(a.VO,a.tQ,a.mZ,e=>class t extends e{#e;constructor(){super();const e=this;Object.defineProperty(this.baseElement,"_container",{get:()=>(t._container||(t._container=document.createElement("descope-notification-container"),t._container.style.position="absolute",document.body.appendChild(t._container)),t._container.isConnected||setTimeout(()=>e.parentNode.appendChild(t._container)),t._container)}),Object.defineProperty(this.baseElement,"_card",{get:()=>e.#e}),this.baseElement._removeNotificationCard=this.close.bind(this)}close(){this.#e.close()}init(){super.init?.(),this.createCard(),(0,o.EA)(this,this.#e),(0,o.Gh)(this.#e,this,{includeAttrs:["opened"]}),this.baseElement.renderer=e=>{Array.from(this.childNodes).forEach(t=>e.appendChild(t))}}get isContainerEmpty(){return!t._container.children.length}removeContainer(){t._container.remove()}removeNotification(){this.remove(),this.isContainerEmpty&&this.removeContainer()}createCard(){this.#e=document.createElement("descope-notification-card"),this.#e.addEventListener("card-closed",this.removeNotification.bind(this))}})((0,a.tz)({wrappedEleName:"vaadin-notification",excludeAttrsSync:["tabindex","style"],componentName:c}));customElements.define(c,s)},69182:(e,t,n)=>{n.r(t),n.d(t,{NotificationCardClass:()=>s}),n(18983);var o=n(9696),i=n(97810),r=n(79365);const a=(0,i.xE)("notification-card"),c={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},s=(0,o.Zz)((0,r.RF)({mappings:{hostMinWidth:{selector:c.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:c.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:c.content,property:"border-width"},borderColor:{selector:c.content,property:"border-color"},borderStyle:{selector:c.content,property:"border-style"},borderRadius:[{selector:c.content,property:"border-radius"},{selector:c.overlay,property:"border-radius"}],verticalPadding:[{selector:c.content,property:"padding-top"},{selector:c.content,property:"padding-bottom"}],horizontalPadding:[{selector:c.content,property:"padding-right"},{selector:c.content,property:"padding-left"}]}}),e=>class extends e{close(){this.baseElement.addEventListener("animationend",()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))}),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n      <div part="root">\n        <div part="content">\n          <slot></slot>\n        </div>\n        <div part="close">\n          <slot name="close"></slot>\n        </div>\n      </div>\n      ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}})((0,r.tz)({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n    vaadin-notification-card {\n      box-shadow: none;\n    }\n    ::part(overlay) {\n      box-shadow: none;\n      background: none;\n    }\n\n    [part="close"] {\n      cursor: pointer;\n      display: flex;\n    }\n\n    [part="content"] {\n      display: flex;\n      align-items: center;\n      flex-grow: 1;\n    }\n\n    [part="root"] {\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      width: 100%;\n    }\n    ',excludeAttrsSync:["tabindex","style"],componentName:a}));customElements.define(a,s)}}]);
//# sourceMappingURL=descope-notification-index-js.js.map