import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host}from"./index-853c3f3f.js";import{b as balBrowser}from"./browser-9199b5e2.js";import{b as balDevice}from"./device-c28cde6d.js";import{b as updateBalAnimated}from"./index-8b8ed6bd.js";import{r as rIC}from"./helpers-697ce790.js";import{L as Logger}from"./log-01623e2c.js";import{i as initStyleMode}from"./mode-3ae7be9a.js";import"./icons.constant-0d61e703.js";var balAppCss=".bal-app{position:relative;display:block}.bal-body.is-ready{visibility:inherit}";var __decorate=undefined&&undefined.__decorate||function(e,t,r,o){var i=arguments.length,a=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(e,t,r,o);else for(var n=e.length-1;n>=0;n--)if(s=e[n])a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a;return i>3&&a&&Object.defineProperty(t,r,a),a};var App=function(){function e(e){registerInstance(this,e);this.balAppLoad=createEvent(this,"balAppLoad",7);this.mode="css";this.animated=true;this.ready=false}e.prototype.createLogger=function(e){this.log=e};e.prototype.connectedCallback=function(){initStyleMode(this.mode);updateBalAnimated(this.animated)};e.prototype.componentDidLoad=function(){var e=this;rIC((function(){return __awaiter(e,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.balAppLoad.emit(true);this.ready=true;import("./focus-visible-ffc6760d.js").then((function(t){return e.focusVisible=t.startFocusVisible()}));return[2]}))}))}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.focusVisible){this.focusVisible.setFocus(e)}return[2]}))}))};e.prototype.render=function(){return h(Host,{role:"application",class:{"bal-app":true,"bal-app--safari":balBrowser.isSafari,"bal-app--touch":balDevice.hasTouchScreen}},h("slot",null))};return e}();__decorate([Logger("bal-app")],App.prototype,"createLogger",null);App.style={css:balAppCss};export{App as bal_app};