export default async function ({emitter}){ class LinksComponent extends HTMLElement { constructor(...args) { const self = super(...args); const templateSelector = '#links-component'; const template = document.querySelector(templateSelector); const templateContent = template.content; const shadowRoot = this.attachShadow({mode: 'open'}); this.shadowRoot.appendChild(templateContent.cloneNode(true)); const content = this.shadowRoot.querySelector('ul'); const update = function(context){ content.innerHTML = ` ${context.locations.filter(location=>location.parent).map(location => `