import { getElement , getElements } from "~/browser" ; /**
 * Component type
 */ export type ComponentType = "announce" | "container" | "content" | "dialog" | "header" | "header-title" | "header-topic" | "main" | "outdated" | "palette" | "search" | "search-query" | "search-result" | "search-share" | "search-suggest" | "sidebar" | "skip" | "source" | "tabs" | "toc" | "top" ; template T template U export type Component < T extends { } = { } , U extends HTMLElement = HTMLElement > = T & { ref : U ; } ; /**
 * Component type map
 */ interface ComponentTypeMap { "announce" : HTMLElement ; "container" : HTMLElement ; "content" : HTMLElement ; "dialog" : HTMLElement ; "header" : HTMLElement ; "header-title" : HTMLElement ; "header-topic" : HTMLElement ; "main" : HTMLElement ; "outdated" : HTMLElement ; "palette" : HTMLElement ; "search" : HTMLElement ; "search-query" : HTMLInputElement ; "search-result" : HTMLElement ; "search-share" : HTMLAnchorElement ; "search-suggest" : HTMLElement ; "sidebar" : HTMLElement ; "skip" : HTMLAnchorElement ; "source" : HTMLAnchorElement ; "tabs" : HTMLElement ; "toc" : HTMLElement ; "top" : HTMLAnchorElement ; } template T param type param node returns export function getComponentElement < T extends ComponentType > ( type , node = document ) { return getElement ( `[data-md-component=${ type }]` , node ) ; } template T param type param node returns export function getComponentElements < T extends ComponentType > ( type , node = document ) { return getElements ( `[data-md-component=${ type }]` , node ) ; }