import"../ui/ui.js";import*as LitHtml from"../third_party/lit-html/lit-html.js";import{getMarkdownLink}from"./MarkdownLinksMap.js";export class MarkdownLink extends HTMLElement{constructor(){super(...arguments),this.shadow=this.attachShadow({mode:"open"}),this.linkText="",this.linkUrl=""}set data(t){const{key:i,title:e}=t,n=getMarkdownLink(i);this.linkText=e,this.linkUrl=n,this.render()}render(){const t=LitHtml.html`
      <style>
        .devtools-link {
          color: var(--color-link);
          text-decoration: none;
        }

        .devtools-link:hover {
          text-decoration: underline;
        }
      </style>
      <x-link class="devtools-link" href=${this.linkUrl}>${this.linkText}</x-link>
    `;LitHtml.render(t,this.shadow)}}customElements.define("devtools-markdown-link",MarkdownLink);