import{r as t,c as s,h as i,H as o}from"./p-bace3d90.js";import"./p-7bff44eb.js";import{r,h as a}from"./p-b9bb59f0.js";const c=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-a272a252.js").then((function(t){return t.s}))).calculateStyles(this);this.hash=t}renderLink(){if(r.router){const t=a(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{c as corejam_base_link}