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 r={};if(this.native){r={novalidate:this.novalidate}}return h(Host,{key:"8b3d28034718b1594fef9900e776ff718e16441d"},h(t,Object.assign({key:"4a21539e4b24d63f95813654d92ac8aa2c0f948b"},r,{class:this.formClass}),h("slot",{key:"9b2a367a300b2803a4868c057e54d14952a557ca"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();Form.style=balFormCss;export{Form as bal_form};