import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{s as scrollToFirstInvalidField}from"./form-FCLKfv6B.js";import{b as waitAfterIdleCallback,a as waitAfterFramePaint}from"./helpers-BNj87EbG.js";import"./browser-B1u-Mq75.js";import"./config.utils-B7jugjyM.js";var balFormCss=".bal-form{display:block;position:static}";var Form=function(){function t(t){registerInstance(this,t);this.native=false;this.novalidate=false;this.formClass=""}t.prototype.scrollToFirstInvalidField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,waitAfterIdleCallback()];case 1:t.sent();return[4,waitAfterFramePaint()];case 2:t.sent();scrollToFirstInvalidField({formEl:this.el});return[2]}}))}))};t.prototype.render=function(){var t=this.native?"form":"div";var e={};if(this.native){e={novalidate:this.novalidate}}return h(Host,{key:"d25c1b6664e41d72f2d2c5b2ad6532fa184d66bf"},h(t,Object.assign({key:"37eefa8920cf3fb639d235d7b21cb7a44be6bd06"},e,{class:this.formClass}),h("slot",{key:"7eff7f47f3fd4732988e17944be73373e6133e32"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();Form.style=balFormCss;export{Form as bal_form};