import{nothing as e}from"lit";import{directive as t,AsyncDirective as n,PartType as s}from"lit/async-directive.js";import{EventHandler as r}from"../lib/events.js";const i=t(class extends n{constructor(e){super(e),this.element=null,this.eventHandler=null}disconnected(){super.disconnected(),this.eventHandler?.disconnect()}update(e){if(e.type!==s.ELEMENT)throw new Error("This directive must be set as on Element.");if(!(e.element instanceof HTMLElement))throw new Error("This directive must be set on a HTMLElement.");return e.element!==this.element&&(this.eventHandler?.disconnect(),this.element=e.element,this.eventHandler=new r(this.element,"slotchange",(e=>{const t=e.currentTarget,n=e.target,s=n.name,r=""===s?"is-slotted":`${s}-is-slotted`;n.assignedNodes().length>0?t.setAttribute(r,""):t.removeAttribute(r)})),this.eventHandler.connect()),this.render()}render(){return e}});export{i as hasSlottedChildren};
//# sourceMappingURL=has-slotted-children.js.map
