/*!
 * EdGEL: The University of Edinburgh Design System v5.3.1 (https://design-system.ed.ac.uk/)
 * Copyright 2014-2025 The University of Edinburgh
 *
 * Bootstrap  v5.3.3 (https://getbootstrap.com/)
 * Copyright 2011-2024 The Bootstrap Authors
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */
import{_ as t,a as e,x as s,c as o}from"./base-D29SVYIK.js";import{o as i}from"./if-defined-L9qFdEae.js";import"./edgel-locator.js";import"./menu-DemWMZ65.js";import"./collapse-Dg2MrZWy.js";import"./collapse-D9mLnlZE.js";import"./selector-engine-0wv5ALVt.js";import"./edgel-icon.js";let n,a,c,l=t=>t;class d extends e{constructor(){super(),this.skipLinkId="uoe-main-content",this.hasMenu=!1,this.observer=new MutationObserver(this._checkContent.bind(this))}_checkContent(){const t=this.shadowRoot?this.shadowRoot.host:this;if(!document.querySelector(`#${this.skipLinkId}`)){let e=t.querySelector(":scope > :not([slot])");e?e.id?this.skipLinkId=e.id:e.id=this.skipLinkId:(e=document.createElement("span"),e.id=this.skipLinkId,e.classList="visually-hidden",e.textContent="No main content available",t.append(e))}this.hasMenu=Boolean(t.querySelector('[slot="menu"]'))}connectedCallback(){super.connectedCallback(),this._checkContent(),this.observer.observe(this.shadowRoot.host,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){const t=this.hasMenu?s(n||(n=l`<div class="col-md-3"><slot name="menu"></slot></div>`)):s(a||(a=l``));return s(c||(c=l`
      <div id="skip-link">
        <a href="#${0}" 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 class="main-content">
              <slot></slot>
            </main>
          </div>
        </div>
      </div>

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