export class Linkifier{linkify(e,i){throw new Error("linkify not implemented")}static linkify(e,i){if(!e)return Promise.reject(new Error("Can't linkify "+e));const r=getApplicableRegisteredlinkifiers(e)[0];return r?r.loadLinkifier().then((r=>r.linkify(e,i))):Promise.reject(new Error("No linkifiers registered for object "+e))}}export let Options;const registeredLinkifiers=[];export function registerLinkifier(e){registeredLinkifiers.push(e)}export function getApplicableRegisteredlinkifiers(e){return registeredLinkifiers.filter((function(i){if(!i.contextTypes)return!0;for(const r of i.contextTypes())if(e instanceof r)return!0;return!1}))}export let LinkifierRegistration;