export const __rspack_esm_id=29439;export const __rspack_esm_ids=[29439];export const __webpack_modules__={77730(e,t,s){s.a(e,async function(e,a){try{s.r(t);s(74423);var o=s(15697),r=s(57527),i=s(79224),c=s(90789),l=s(148),h=s(55682),n=s(62705),u=s(13446),_=e([h]);h=(_.then?(await _)():_)[0];class d extends r.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return r.s6;const e=this.context?.entity_id?this.hass.states[this.context.entity_id]:void 0,t=(0,u.Sg)(e,this._config.forecast_type)||"daily",s="hourly"===t,a={...this._config,forecast_type:t,...s?{hours_to_show:this._config.hours_to_show??24}:{days_to_show:this._config.days_to_show??7}},o=this._schema(e,t,this.hass.localize);return r.qy` <ha-form .hass=${this.hass} .data=${a} .schema=${o} .computeLabel=${this._computeLabelCallback} @value-changed=${this._valueChanged}></ha-form> `}_valueChanged(e){(0,l.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,c.A)((e,t,s)=>{const a=e?(0,n.V7)(e):[],o="hourly"===t;return[{name:"forecast_type",required:!0,disabled:a.length<=1,selector:{select:{mode:"dropdown",options:["daily","twice_daily","hourly"].map(e=>({value:e,label:s(`ui.panel.lovelace.editor.features.types.temperature-forecast.forecast_type_options.${e}`),disabled:!a.includes(e)}))}}},o?{name:"hours_to_show",default:24,selector:{number:{min:1,mode:"box"}}}:{name:"days_to_show",default:7,selector:{number:{min:1,mode:"box"}}},{name:"color",selector:{ui_color:{default_color:"state",include_state:!0}}},{name:"show_labels",default:!0,selector:{boolean:{}}}]}),this._computeLabelCallback=e=>{switch(e.name){case"forecast_type":return this.hass.localize("ui.panel.lovelace.editor.features.types.temperature-forecast.forecast_type");case"days_to_show":case"hours_to_show":return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`);case"color":return this.hass.localize("ui.panel.lovelace.editor.features.types.temperature-forecast.color");case"show_labels":return this.hass.localize("ui.panel.lovelace.editor.features.types.temperature-forecast.show_labels");default:return""}}}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"context",void 0),(0,o.Cg)([(0,i.wk)()],d.prototype,"_config",void 0),d=(0,o.Cg)([(0,i.EM)("hui-temperature-forecast-card-feature-editor")],d),s.d(t,{HuiTemperatureForecastCardFeatureEditor:()=>d}),a()}catch(e){a(e)}})}};
//# sourceMappingURL=29439.ddd53e71c2cc4979.js.map