"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./query-assigned-elements-8EurZY45.js"),l=require("./property-DYTC_2-m.js"),u=require("./state-C3HoXfoa.js"),p=require("./class-map-DTzB8z-1.js");require("./typography.js");require("./icon.js");const v='.filled{font-variation-settings:"FILL" 1}.hidden{display:none}.icon-lockup{align-items:center;display:flex;gap:4px;max-width:100%}.icon-lockup cv-typography{flex:1 0 0}.icon-lockup--primary,.icon-lockup--loading{color:var(--cv-theme-primary)}.icon-lockup--positive{color:var(--cv-theme-positive)}.icon-lockup--negative{color:var(--cv-theme-negative)}.icon-lockup--caution{color:var(--cv-theme-caution)}.text{font-feature-settings:"liga" off,"clig" off;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trailing-icon{flex-direction:row-reverse}';var h=Object.defineProperty,y=Object.getOwnPropertyDescriptor,e=(s,o,c,i)=>{for(var t=i>1?void 0:i?y(o,c):o,a=s.length-1,r;a>=0;a--)(r=s[a])&&(t=(i?r(o,c,t):r(t))||t);return i&&t&&h(o,c,t),t};exports.CovalentIconLockup=class extends n.s{constructor(){super(...arguments),this.covalentIcon=!1,this.filledIcon=!1,this.icon="",this.scale="body1",this.state="neutral",this.trailingIcon=!1,this._hasIconSlot=!1}checkIconSlot(){var c;const o=(c=this.shadowRoot)==null?void 0:c.querySelector('slot[name="icon"]');this._hasIconSlot=o&&o.assignedNodes().length>0}iconTemplate(){const o={"covalent-icon":this.covalentIcon,filled:this.filledIcon,hidden:this._hasIconSlot};return n.x`<slot name="icon"></slot>
      <cv-icon
        class=${p.o(o)}
        style="${`font-size: var(--cv-typography-${this.scale}-line-height, 16px)`}"
      >
        ${this.icon}
      </cv-icon>`}render(){const o={"icon-lockup":!0,[`icon-lockup--${this.state}`]:this.state,"trailing-icon":this.trailingIcon};return n.x`
      <cv-typography class=${p.o(o)} scale="${this.scale}">
        ${this.iconTemplate()}
        <div class="text"><slot></slot></div>
      </cv-typography>
    `}updated(o){super.updated(o),this.checkIconSlot()}};exports.CovalentIconLockup.styles=[n.i`
      ${n.r(v)}
    `];e([l.n({type:Boolean,reflect:!0})],exports.CovalentIconLockup.prototype,"covalentIcon",2);e([l.n({type:Boolean,reflect:!0})],exports.CovalentIconLockup.prototype,"filledIcon",2);e([l.n({type:String})],exports.CovalentIconLockup.prototype,"icon",2);e([l.n({type:String})],exports.CovalentIconLockup.prototype,"scale",2);e([l.n({type:String})],exports.CovalentIconLockup.prototype,"state",2);e([l.n({type:Boolean})],exports.CovalentIconLockup.prototype,"trailingIcon",2);e([u.t()],exports.CovalentIconLockup.prototype,"_hasIconSlot",2);exports.CovalentIconLockup=e([n.e("cv-icon-lockup")],exports.CovalentIconLockup);const d=exports.CovalentIconLockup;exports.default=d;
