renderFromData() {
    if (this.data?.length === 0) {
      return;
    }

    // Re-apply template (picks up top-level attributes from menu data)
    const template = document.createElement('template');
    const html = this.template();

    // Render and append styles
    this.shadowRoot.innerHTML = '';
    template.innerHTML = html;
    this.shadowRoot.appendChild(template.content.cloneNode(true));

    // Re-render all children
    this.innerHTML = '';
    this.insertAdjacentHTML('beforeend', this.menuContentTemplate(this.data));
  }
/**
   * Rerender the list by re applying the template
   * @private
   */
Rerender the list by re applying the template
@private
Rerender the list by re applying the template @private
renderFromData() {
    if (this.data?.length === 0) {
      return;
    }
    const template = document.createElement('template');
    const html = this.template();
    this.shadowRoot.innerHTML = '';
    template.innerHTML = html;
    this.shadowRoot.appendChild(template.content.cloneNode(true));
    this.innerHTML = '';
    this.insertAdjacentHTML('beforeend', this.menuContentTemplate(this.data));
  }
renderFromData ( ) { if ( this . data ?. length === 0 ) { return ; } const template = document . createElement ( 'template' ) ; const html = this . template ( ) ; this . shadowRoot . innerHTML = '' ; template . innerHTML = html ; this . shadowRoot . appendChild ( template . content . cloneNode ( true ) ) ; this . innerHTML = '' ; this . insertAdjacentHTML ( 'beforeend' , this . menuContentTemplate ( this . data ) ) ; }
Rerender the list by re applying the template
 @private
Rerender the list by re applying the template @private
// Re-apply template (picks up top-level attributes from menu data) // Render and append styles // Re-render all children