var n=Object.defineProperty;var d=(s,r)=>{for(var e in r)n(s,e,{get:r[e],enumerable:!0})};var l={};d(l,{Adorner:()=>o});import{html as c,render as h}from"./../../lit/lit.js";import*as a from"./../../legacy/legacy.js";var i=`:host{display:inline-flex}:host(.hidden){display:none}slot{display:inline-flex;box-sizing:border-box;height:14px;line-height:13px;padding:0 6px;font-size:var(--override-adorner-font-size,8.5px);color:var(--override-adorner-text-color,var(--sys-color-primary));background-color:var(--override-adorner-background-color,var(--sys-color-cdt-base-container));border:1px solid var(--override-adorner-border-color,var(--sys-color-tonal-outline));border-radius:10px;position:relative;&:hover::after,
  &:active::before{content:"";height:100%;width:100%;border-radius:inherit;position:absolute;top:0;left:0}&:hover::after{background-color:var(--sys-color-state-hover-on-subtle)}&:active::before{background-color:var(--sys-color-state-ripple-neutral-on-subtle)}}:host(:focus-visible) slot{outline:2px solid var(--sys-color-state-focus-ring);outline-offset:2px;z-index:999}:host([aria-pressed="true"]) slot{color:var(--override-adorner-active-text-color,var(--sys-color-on-primary));background-color:var(--override-adorner-active-background-color,var(--sys-color-primary));border:1px solid var(--override-adorner-active-background-color,var(--sys-color-primary));&:hover::after{background-color:var(--sys-color-state-hover-on-prominent)}&:active::before{background-color:var(--sys-color-state-ripple-primary)}}::slotted(*){height:10px}
/*# sourceURL=${import.meta.resolve("./adorner.css")} */`;var o=class extends HTMLElement{name="";#o=this.attachShadow({mode:"open"});#e=!1;cloneNode(r){let e=a.UIUtils.cloneCustomElement(this,r);return e.name=this.name,e.#e=this.#e,e}connectedCallback(){this.getAttribute("aria-label")||this.setAttribute("aria-label",this.name),this.#t()}static observedAttributes=["active","toggleable"];attributeChangedCallback(r,e,t){if(e!==t)switch(r){case"active":this.#r(t==="true");break;case"toggleable":this.#e=t==="true",this.#r(this.getAttribute("active")==="true");break}}isActive(){return this.getAttribute("aria-pressed")==="true"}#r(r){if(!this.#e)return;let e=r===void 0?!this.isActive():r;this.setAttribute("role","button"),this.setAttribute("aria-pressed",(!!e).toString())}show(){this.classList.remove("hidden")}hide(){this.classList.add("hidden")}#t(){h(c`<style>${i}</style><slot></slot>`,this.#o,{host:this})}};customElements.define("devtools-adorner",o);export{l as Adorner};
//# sourceMappingURL=adorners.js.map
