"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["8287"],{41730:function(e,t,a){a.r(t),a.d(t,{HaFormFloat:function(){return n}});a(45269),a(32203),a(35748),a(91455),a(67579),a(90917),a(30500),a(95013);var i=a(69868),o=a(84922),r=a(11991),s=a(44017);a(80287);let d,l,h=e=>e;class n extends o.WF{focus(){this._input&&this._input.focus()}render(){var e,t;return(0,o.qy)(d||(d=h` <ha-textfield type="number" inputMode="decimal" step="any" .label="${0}" .helper="${0}" helperPersistent .value="${0}" .disabled="${0}" .required="${0}" .autoValidate="${0}" .suffix="${0}" .validationMessage="${0}" @input="${0}"></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?null===(t=this.localize)||void 0===t?void 0:t.call(this,"ui.common.error_required"):void 0,this._valueChanged)}updated(e){e.has("schema")&&this.toggleAttribute("own-margin",!!this.schema.required)}_valueChanged(e){const t=e.target.value.replace(",",".");let a;t.endsWith(".")||"-"!==t&&(""!==t&&(a=parseFloat(t),isNaN(a)&&(a=void 0)),this.data!==a&&(0,s.r)(this,"value-changed",{value:a}))}constructor(...e){super(...e),this.disabled=!1}}n.styles=(0,o.AH)(l||(l=h`:host([own-margin]){margin-bottom:5px}ha-textfield{display:block}`)),(0,i.__decorate)([(0,r.MZ)({attribute:!1})],n.prototype,"localize",void 0),(0,i.__decorate)([(0,r.MZ)({attribute:!1})],n.prototype,"schema",void 0),(0,i.__decorate)([(0,r.MZ)({attribute:!1})],n.prototype,"data",void 0),(0,i.__decorate)([(0,r.MZ)()],n.prototype,"label",void 0),(0,i.__decorate)([(0,r.MZ)()],n.prototype,"helper",void 0),(0,i.__decorate)([(0,r.MZ)({type:Boolean})],n.prototype,"disabled",void 0),(0,i.__decorate)([(0,r.P)("ha-textfield")],n.prototype,"_input",void 0),n=(0,i.__decorate)([(0,r.EM)("ha-form-float")],n)}}]);
//# sourceMappingURL=8287.37d082339945cdda.js.map