import{css as i,html as e}from"lit";import{classMap as o}from"lit/directives/class-map.js";import{ifDefined as n}from"lit/directives/if-defined.js";function r(i){try{return new URL(i,location.href).origin!==location.origin}catch(i){return!0}}const c=(i,c,t=!1,l)=>{const a=null==i||t?void 0:i,s=r(a)?"_blank":void 0,d=r(a)?"noopener noreferrer":void 0;return e`<a class="${o({skeleton:t})} cc-link" href=${n(a)} target=${n(s)} rel=${n(d)} title=${n(l)}>${c}</a>`},t=i`.cc-link,.cc-link:active,.cc-link:visited,.sanitized-link,.sanitized-link:active,.sanitized-link:visited{color:var(--cc-color-text-primary-highlight,#00f)}.cc-link:enabled:hover,.sanitized-link:enabled:hover{color:var(--cc-color-text-primary)}.cc-link:focus,.sanitized-link:focus{background-color:var(--cc-color-bg-default,#fff);border-radius:.1em;outline:var(--cc-focus-outline,#000 solid 2px);outline-offset:var(--cc-focus-outline-offset,2px)}.cc-link::-moz-focus-inner,.sanitized-link::-moz-focus-inner{border:0}.cc-link .skeleton,.cc-link.skeleton,.sanitized-link .skeleton,.sanitized-link.skeleton{background-color:var(--cc-color-text-primary-weak,hsl(209deg 98% 73%));color:transparent}`;export{c as ccLink,t as linkStyles};
//# sourceMappingURL=cc-link.js.map
