<div class="adev-playground-header">
  <header>
    <h1 tabindex="-1">Angular Playground</h1>
  </header>
  <div class="adev-template-select">
    <button type="button" [cdkMenuTriggerFor]="templatesMenu">
      <span>{{ selectedTemplate.label }}</span>
      <docs-icon>expand_more</docs-icon>
    </button>
  </div>
</div>

@if (embeddedEditorComponent) {
  <div class="adev-embedded-editor-wrapper">
    <ng-container *ngComponentOutlet="embeddedEditorComponent" />
  </div>
}

<ng-template #templatesMenu>
  <ul class="adev-template-dropdown" cdkMenu>
    @for (template of templates; track template.path) {
      <li>
        <button cdkMenuItem type="button" (click)="changeTemplate(template)">
          <span>{{ template.label }}</span>
        </button>
      </li>
    }
  </ul>
</ng-template>
