import{__decorate as t,__classPrivateFieldGet as e,__classPrivateFieldSet as s}from"../../_virtual/_tslib.js";import'./../../external/@lit/reactive-element/reactive-element.js';import{html as i}from'./../../external/lit-html/lit-html.js';import{LitElement as l}from'./../../external/lit-element/lit-element.js';import{customElement as r}from'./../../external/@lit/reactive-element/decorators/custom-element.js';import{property as n}from'./../../external/@lit/reactive-element/decorators/property.js';import'./../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import{classMap as a}from'./../../external/lit-html/directives/class-map.js';import{LINK_TARGETS as o,LINK_TYPES as d}from"./defs.js";import p from"./link.scss.js";var h,m,k,c,u,f;let y=class extends l{constructor(){super(...arguments),h.set(this,""),m.set(this,o.SELF),k.set(this,d.PRIMARY),c.set(this,""),u.set(this,!1),f.set(this,!1)}get href(){return e(this,h,"f")}set href(t){s(this,h,t,"f")}get target(){return e(this,m,"f")}set target(t){s(this,m,t,"f")}get kind(){return e(this,k,"f")}set kind(t){s(this,k,t,"f")}get rel(){return e(this,c,"f")}set rel(t){s(this,c,t,"f")}get disabled(){return e(this,u,"f")}set disabled(t){s(this,u,t,"f")}get standalone(){return e(this,f,"f")}set standalone(t){s(this,f,t,"f")}render(){const t=this.returnClassMap();return i`<a
      class="kd-link-text ${t}"
      target=${this.target}
      role="link"
      rel=${this.rel}
      href=${this.href?this.href:"javascript:void(0)"}
      ?disabled=${this.disabled}
      @click=${t=>this.handleClick(t)}
    >
      <span class="kd-link-text-span-flex">
        <slot></slot>
        <slot name="icon"></slot>
      </span>
    </a>`}returnClassMap(){return this.disabled?a({"kd-link-text-disabled":this.disabled}):a({"kd-link-text-primary":this.kind===d.PRIMARY||!this.kind,"kd-link-text-secondary":this.kind===d.SECONDARY,"kd-link-text-inline":!this.standalone,"kd-link-text-standalone":this.standalone})}handleClick(t){if(this.disabled)return void t.preventDefault();const e=new CustomEvent("on-click",{detail:{origEvent:t}});this.dispatchEvent(e)}};h=new WeakMap,m=new WeakMap,k=new WeakMap,c=new WeakMap,u=new WeakMap,f=new WeakMap,y.styles=[p],t([n({type:String})],y.prototype,"href",null),t([n({type:String})],y.prototype,"target",null),t([n({type:String})],y.prototype,"kind",null),t([n({type:String})],y.prototype,"rel",null),t([n({type:Boolean,reflect:!0})],y.prototype,"disabled",null),t([n({type:Boolean})],y.prototype,"standalone",null),y=t([r("kd-link")],y);export{y as Link};
//# sourceMappingURL=link.js.map
