import{r as t,c as s,h as i,H as o}from"./p-7217ae02.js";import"./p-cdb53f07.js";import{r,h as c}from"./p-1523a153.js";const e=class{constructor(i){t(this,i),this.routeChange=s(this,"routeChange",7),this.style=[],this.color="--cj-color-primary",this.hoverColor="--cj-color-secondary",this.decoration="--cj-link-decoration",this.hoverDecoration="--cj-link-hover-decoration"}async componentWillLoad(){await this.computeStyles()}async computeStyles(){const t=await(await import("./p-ee0c94d2.js").then((function(t){return t.s}))).calculateStyles(this);this.hash=t}renderLink(){if(r.router){const t=c(this.href,r.router),s=Object.assign(Object.assign({},t),{onClick:s=>{this.routeChange.emit({type:"routechange",newUrl:this.href}),"function"==typeof t.onClick&&t.onClick(s),window.scrollTo({top:0})}});return i("a",Object.assign({},s,{class:this.hash}),i("slot",null))}return i("a",{href:this.href,class:this.hash},i("slot",null))}render(){return i(o,{class:this.hash},this.renderLink())}};export{e as corejam_base_link}