import{LitElement as e,html as t,css as i}from"lit";class s extends e{static get properties(){return{disableStretching:{type:Boolean,attribute:"disable-stretching",reflect:!0},visibleElementId:{type:String,attribute:"visible-element-id",reflect:!0}}}constructor(){super(),this.disableStretching=!1,this.visibleElementId=null}_makeElementVisible(){const e=this.querySelector(":scope > .cc-stretch--visible"),t=this.querySelector(`:scope > #${this.visibleElementId}`);e?.classList.remove("cc-stretch--visible"),t?.classList.add("cc-stretch--visible")}updated(e){e.has("visibleElementId")&&this._makeElementVisible()}render(){return t`<slot @slotchange=${this._makeElementVisible}></slot>`}static get styles(){return[i`:host{align-items:var(--cc-stretch-align-items,center);display:inline-grid;justify-items:var(--cc-stretch-justify-items,center);width:max-content}:host([disable-stretching]) slot::slotted(:not(.cc-stretch--visible)){display:none}slot::slotted(*){grid-area:1/1/2/2;visibility:hidden}slot::slotted(.cc-stretch--visible){visibility:inherit}`]}}window.customElements.define("cc-stretch",s);export{s as CcStretch};
//# sourceMappingURL=cc-stretch.js.map
