import{__decorate as t,__classPrivateFieldGet as e,__classPrivateFieldSet as s}from"../../_virtual/_tslib.js";import'./../../external/lit/external/@lit/reactive-element/reactive-element.js';import'./../../external/lit/external/lit-html/lit-html.js';import{LitElement as l}from'./../../external/lit-element/lit-element.js';import{customElement as i}from'./../../external/lit/external/@lit/reactive-element/decorators/custom-element.js';import{property as n}from'./../../external/lit/external/@lit/reactive-element/decorators/property.js';import{classMap as r}from'./../../external/lit/external/lit-html/directives/class-map.js';import{LINK_TARGETS as o,LINK_TYPES as a}from"./defs.js";import d from"./link.scss.js";import{html as m}from'./../../external/lit-element/external/lit-html/lit-html.js';var p,h,u,k,f,c;let y=class extends l{constructor(){super(...arguments),p.set(this,""),h.set(this,o.SELF),u.set(this,a.PRIMARY),k.set(this,""),f.set(this,!1),c.set(this,!1)}get href(){return e(this,p,"f")}set href(t){s(this,p,t,"f")}get target(){return e(this,h,"f")}set target(t){s(this,h,t,"f")}get kind(){return e(this,u,"f")}set kind(t){s(this,u,t,"f")}get rel(){return e(this,k,"f")}set rel(t){s(this,k,t,"f")}get disabled(){return e(this,f,"f")}set disabled(t){s(this,f,t,"f")}get standalone(){return e(this,c,"f")}set standalone(t){s(this,c,t,"f")}render(){const t=this.returnClassMap();return m`<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?r({"kd-link-text-disabled":this.disabled}):r({"kd-link-text-primary":this.kind===a.PRIMARY||!this.kind,"kd-link-text-secondary":this.kind===a.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)}};p=new WeakMap,h=new WeakMap,u=new WeakMap,k=new WeakMap,f=new WeakMap,c=new WeakMap,y.styles=[d],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([i("kd-link")],y);export{y as Link};
//# sourceMappingURL=link.js.map
