"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6703],{96272:function(e,t,i){i.r(t),i.d(t,{HaFormFloat:function(){return k}});var a,d,n=i(88962),r=i(33368),o=i(71650),l=i(82390),s=i(69205),u=i(70906),h=i(91808),v=i(68144),c=i(79932),f=i(47181),k=(i(3555),(0,h.Z)([(0,c.Mo)("ha-form-float")],(function(e,t){var i=function(t){(0,s.Z)(a,t);var i=(0,u.Z)(a);function a(){var t;(0,o.Z)(this,a);for(var d=arguments.length,n=new Array(d),r=0;r<d;r++)n[r]=arguments[r];return t=i.call.apply(i,[this].concat(n)),e((0,l.Z)(t)),t}return(0,r.Z)(a)}(t);return{F:i,d:[{kind:"field",decorators:[(0,c.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,c.Cb)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,c.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,c.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,c.Cb)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,c.IO)("ha-textfield")],key:"_input",value:void 0},{kind:"method",key:"focus",value:function(){this._input&&this._input.focus()}},{kind:"method",key:"render",value:function(){var e;return(0,v.dy)(a||(a=(0,n.Z)([' <ha-textfield type="numeric" inputMode="decimal" .label="','" .helper="','" helperPersistent .value="','" .disabled="','" .required="','" .autoValidate="','" .suffix="','" .validationMessage="','" @input="','"></ha-textfield> '])),this.label,this.helper,void 0!==this.data?this.data:"",this.disabled,this.schema.required,this.schema.required,null===(e=this.schema.description)||void 0===e?void 0:e.suffix,this.schema.required?"Required":void 0,this._valueChanged)}},{kind:"method",key:"updated",value:function(e){e.has("schema")&&this.toggleAttribute("own-margin",!!this.schema.required)}},{kind:"method",key:"_valueChanged",value:function(e){var t,i=e.target,a=i.value.replace(",",".");if(!a.endsWith(".")&&"-"!==a)if(""!==a&&(t=parseFloat(a),isNaN(t)&&(t=void 0)),this.data!==t)(0,f.B)(this,"value-changed",{value:t});else{var d=void 0===t?"":String(t);i.value!==d&&(i.value=d)}}},{kind:"field",static:!0,key:"styles",value:function(){return(0,v.iv)(d||(d=(0,n.Z)([":host([own-margin]){margin-bottom:5px}ha-textfield{display:block}"])))}}]}}),v.oi))}}]);
//# sourceMappingURL=6703-sHmEnkLhvbw.js.map