import{__decorate as t}from"../../_virtual/_tslib.js";import'./../../external/@lit/reactive-element/reactive-element.js';import{html as e}from'./../../external/lit-html/lit-html.js';import{LitElement as s}from'./../../external/lit-element/lit-element.js';import{customElement as i}from'./../../external/@lit/reactive-element/decorators/custom-element.js';import{property as l}from'./../../external/@lit/reactive-element/decorators/property.js';import'./../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import{classMap as o}from'./../../external/lit-html/directives/class-map.js';import{LINK_TARGETS as r,LINK_TYPES as n}from"./defs.js";import d from"./link.scss.js";let a=class extends s{constructor(){super(...arguments),this.href="",this.target=r.SELF,this.kind=n.PRIMARY,this.rel="",this.disabled=!1,this.standalone=!1}render(){const t=this.returnClassMap();return e`<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?o({"kd-link-text-disabled":this.disabled}):o({"kd-link-text-primary":this.kind===n.PRIMARY||!this.kind,"kd-link-text-secondary":this.kind===n.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)}};a.styles=[d],t([l({type:String})],a.prototype,"href",void 0),t([l({type:String})],a.prototype,"target",void 0),t([l({type:String})],a.prototype,"kind",void 0),t([l({type:String})],a.prototype,"rel",void 0),t([l({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0),t([l({type:Boolean})],a.prototype,"standalone",void 0),a=t([i("kd-link")],a);export{a as Link};
//# sourceMappingURL=link.js.map
