/*! For license information please see src_Weather_jsx.ac3df36a.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkiobroker_vis_widget_thermostat=self.webpackChunkiobroker_vis_widget_thermostat||[]).push([["src_Weather_jsx","node_modules_react_jsx-runtime_js"],{97380:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});a(28437);var r=a(67085),i=a(59797),s=a(34449),n=a(70579);class o extends(window.visRxWidget||i.VisRxWidget){static getWidgetInfo(){return{id:"tplOpenWeatherMapWeather",visSet:"openweathermap",visSetLabel:"set_label",visSetColor:"#1d8700",visWidgetLabel:"weather",visName:"Weather",visAttrs:[{name:"common",fields:[{name:"widgetTitle",label:"title",type:"text"},{name:"type",label:"type",type:"select",options:[{value:"all",label:"type_all"},{value:"current",label:"type_current"},{value:"days",label:"type_days"}],default:"all"},{name:"days",label:"days",type:"select",hidden:'data.type === "current"',options:["6","5","4","3","2","1"],default:"6",noTranslation:!0},{label:"instance",name:"instance",type:"instance",adapter:"openweathermap",isShort:!0,default:"0"},{name:"current_temp_oid",label:"current_temp_oid",tooltip:"current_temp_oid_tooltip",type:"id"},{name:"current_humidity_oid",label:"current_humidity_oid",tooltip:"current_temp_oid_tooltip",type:"id"}]}],visDefaultStyle:{width:"100%",height:185,position:"relative"},visPrev:"widgets/openweathermap/img/prev_weather.png"}}static getI18nPrefix(){return"openweathermap_"}getWidgetInfo(){return o.getWidgetInfo()}renderWidgetBody(t){var e,a,i;super.renderWidgetBody(t);const o=(0,n.jsx)(s.A,{socket:this.props.context.socket,instance:this.state.rxData.instance||0,daysCount:this.state.rxData.days?parseInt(this.state.rxData.days,10):6,hideDays:"current"===this.state.rxData.type,hideCurrent:"days"===this.state.rxData.type,currentTemp:this.state.rxData.current_temp_oid?this.state.values["".concat(this.state.rxData.current_temp_oid,".val")]:null,currentHumidity:this.state.rxData.current_humidity_oid?this.state.values["".concat(this.state.rxData.current_humidity_oid,".val")]:null,isFloatComma:null===(e=this.props.context)||void 0===e||null===(a=e.systemConfig)||void 0===a||null===(i=a.common)||void 0===i?void 0:i.isFloatComma,theme:this.props.context.theme});return this.wrapContent(o,null,null,null,null,{Card:r.Card,CardContent:r.CardContent})}}const l=o},51153:(t,e,a)=>{var r=a(28437),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(t,e,a){var r,s={},d=null,p=null;for(r in void 0!==a&&(d=""+a),void 0!==e.key&&(d=""+e.key),void 0!==e.ref&&(p=e.ref),e)n.call(e,r)&&!l.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===s[r]&&(s[r]=e[r]);return{$$typeof:i,type:t,key:d,ref:p,props:s,_owner:o.current}}e.Fragment=s,e.jsx=d,e.jsxs=d},70579:(t,e,a)=>{t.exports=a(51153)}}]);
//# sourceMappingURL=src_Weather_jsx.ac3df36a.chunk.js.map