/*!
 * EdGEL: The University of Edinburgh Design System v5.0.0 (https://design-system.ed.ac.uk/)
 * Copyright 2014-2023 The University of Edinburgh
 *
 * Bootstrap  v5.3.2 (https://getbootstrap.com/)
 * Copyright 2011-2023 The Bootstrap Authors
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */
import{_ as e,E as t,x as s,c as o}from"./base-2Isyko0t.js";import{o as n}from"./if-defined-66voXlkv.js";import"./edgel-locator.js";import"./menu-7_PRmfGT.js";import"./collapse-zYCjoaZf.js";import"./collapse-Fp-mMCqS.js";import"./selector-engine-FWBG9T7Z.js";import"./edgel-icon.js";let a,i,c,l=e=>e;class d extends t{constructor(){super(),this.hasMenu=!1,this.observer=new MutationObserver(this._checkMenu.bind(this))}_checkMenu(){const e=this.shadowRoot?this.shadowRoot.host:this;this.hasMenu=Boolean(e.querySelector('[slot="menu"]'))}connectedCallback(){super.connectedCallback(),this._checkMenu(),this.observer.observe(this.shadowRoot.host,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){const e=this.hasMenu?s(a||(a=l`<div class="col-md-3"><slot name="menu"></slot></div>`)):s(i||(i=l``));return s(c||(c=l`
      <div id="skip-link">
        <a href="#uoe-main-content" class="skip-link">Skip to main content</a>
      </div>
      <slot name="top-nav"></slot>
      <slot name="masthead"><edgel-masthead></edgel-masthead></slot>

      <div class="container-content">
        <div class="row">
          ${0}
          <div class="col">
            <edgel-locator contact-link=${0}></edgel-locator>
            <main id="uoe-main-content" class="main-content">
              <slot></slot>
            </main>
          </div>
        </div>
      </div>

      <slot name="footer"></slot>
    `),e,n(this.contactLink))}updated(){if(document.body.classList.contains("preloader")){const e=new CustomEvent("loaded.edgel.preloader",{bubbles:!0,cancelable:!1});this.dispatchEvent(e)}}}e(d,"properties",{contactLink:{type:String,attribute:"contact-link"},hasMenu:{type:Boolean,attribute:!1}}),o("edgel-page",d);
