import"../../legacy/legacy.js";import*as ComponentHelpers from"../../components/helpers/helpers.js";import*as LitHtml from"../../lit-html/lit-html.js";import markdownLinkStyles from"./markdownLink.css.js";import{getMarkdownLink}from"./MarkdownLinksMap.js";export class MarkdownLink extends HTMLElement{static litTagName=LitHtml.literal`devtools-markdown-link`;#t=this.attachShadow({mode:"open"});#e="";#n="";connectedCallback(){this.#t.adoptedStyleSheets=[markdownLinkStyles]}set data(t){const{key:e,title:n}=t,o=getMarkdownLink(e);this.#e=n,this.#n=o,this.#o()}#o(){const t=LitHtml.html`
      <x-link class="devtools-link" href=${this.#n}>${this.#e}</x-link>
    `;LitHtml.render(t,this.#t,{host:this})}}ComponentHelpers.CustomElements.defineComponent("devtools-markdown-link",MarkdownLink);