import{__awaiter,__generator}from"tslib";import{H as registerInstance,y as waitAfterIdleCallback,x as waitAfterFramePaint,M as h,N as Host,O as getElement}from"./index-CklISCW5.js";import{s as scrollToFirstInvalidField}from"./form-FCLKfv6B.js";var balFormCss=".bal-form{display:block;position:static}";var Form=function(){function e(e){registerInstance(this,e);this.native=false;this.novalidate=false;this.formClass=""}e.prototype.scrollToFirstInvalidField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,waitAfterIdleCallback()];case 1:e.sent();return[4,waitAfterFramePaint()];case 2:e.sent();scrollToFirstInvalidField({formEl:this.el});return[2]}}))}))};e.prototype.render=function(){var e=this.native?"form":"div";var t={};if(this.native){t={novalidate:this.novalidate}}return h(Host,{key:"ed6e199a51186247ccad8e06989ba9819e43bed2"},h(e,Object.assign({key:"de4a61e1690819e10096cd1c35eecc0371d73aae"},t,{class:this.formClass}),h("slot",{key:"f35cce725fc54ad822aada77aabaf6f0babd4141"})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Form.style=balFormCss;export{Form as bal_form};