import{r as s,c as t,h as a,H as i,g as o}from"./p-4c596c7f.js";import{b as e}from"./p-b9dddc6c.js";import{b as p}from"./p-f93c5ab8.js";import{b as c}from"./p-85125f06.js";import{d as r,r as l}from"./p-7c87fba4.js";import{L as n}from"./p-efcca75f.js";import{i as h}from"./p-42fa5fb2.js";import"./p-c57ee67c.js";const b=class{constructor(a){s(this,a),this.balAppLoad=t(this,"balAppLoad",7),this.debouncedNotify=r((()=>this.notifyResize()),100),this.notifyResize=async()=>{e.hasDocument&&e.hasWindow&&document.documentElement.style.setProperty("--bal-app-height",`${window.innerHeight}px`)},this.mode="css",this.animated=!0,this.ready=!1}createLogger(s){this.log=s}connectedCallback(){h(this.mode),c(this.animated),e.hasWindow&&(window.addEventListener("resize",this.debouncedNotify),this.debouncedNotify())}componentDidLoad(){l((async()=>{this.balAppLoad.emit(!0),this.ready=!0,import("./p-3c33d5da.js").then((s=>this.focusVisible=s.startFocusVisible()))}))}disconnectedCallback(){e.hasWindow&&window.removeEventListener("resize",this.debouncedNotify)}async setFocus(s){this.focusVisible&&this.focusVisible.setFocus(s)}render(){return a(i,{role:"application",class:{"bal-app":!0,"bal-app--safari":e.isSafari,"bal-app--touch":p.hasTouchScreen}},a("slot",null))}get el(){return o(this)}};(function(s,t,a,i){var o,e=arguments.length,p=e<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(s,t,a,i);else for(var c=s.length-1;c>=0;c--)(o=s[c])&&(p=(e<3?o(p):e>3?o(t,a,p):o(t,a))||p);e>3&&p&&Object.defineProperty(t,a,p)})([n("bal-app")],b.prototype,"createLogger",null),b.style={css:":root{--bal-app-height:100%}.bal-app{position:relative;display:block}.bal-body.is-ready{visibility:inherit}"};export{b as bal_app}