export const __rspack_esm_id="90742";export const __rspack_esm_ids=["90742"];export const __webpack_modules__={4757(e,t,a){a.r(t),a.d(t,{HuiMarkdownCardEditor:()=>_});var s=a(62826),o=a(96196),i=a(44457),l=a(22786),r=a(63533),n=a(1087),c=(a(52763),a(84698));const d=(0,r.kp)(c.H,(0,r.Ik)({text_only:(0,r.lq)((0,r.zM)()),title:(0,r.lq)((0,r.Yj)()),content:(0,r.Yj)()}));class _ extends o.WF{setConfig(e){(0,r.vA)(e,d),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e={...this._config,style:this._config.text_only?"text-only":"card"},t=this._schema(this.hass.localize,this._config.text_only||!1);return o.qy` <ha-form .hass="${this.hass}" .data="${e}" .schema="${t}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}_valueChanged(e){const t={...e.detail.value};"text-only"===t.style?t.text_only=!0:delete t.text_only,delete t.style,(0,n.r)(this,"config-changed",{config:t})}constructor(...e){super(...e),this._schema=(0,l.A)((e,t)=>[{name:"style",required:!0,selector:{select:{mode:"box",options:["card","text-only"].map(t=>({label:e(`ui.panel.lovelace.editor.card.markdown.style_options.${t}`),image:{src:`/static/images/form/markdown_${t.replace("-","_")}.svg`,src_dark:`/static/images/form/markdown_${t.replace("-","_")}_dark.svg`,flip_rtl:!0},value:t}))}}},...t?[]:[{name:"title",selector:{text:{}}}],{name:"content",required:!0,selector:{template:{}}}]),this._computeLabelCallback=e=>{switch(e.name){case"style":case"content":return this.hass.localize(`ui.panel.lovelace.editor.card.markdown.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,s.Cg)([(0,i.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,s.Cg)([(0,i.wk)()],_.prototype,"_config",void 0),_=(0,s.Cg)([(0,i.EM)("hui-markdown-card-editor")],_)},84698(e,t,a){a.d(t,{H:()=>o});var s=a(63533);const o=(0,s.Ik)({type:(0,s.Yj)(),view_layout:(0,s.bz)(),layout_options:(0,s.bz)(),grid_options:(0,s.bz)(),visibility:(0,s.bz)(),disabled:(0,s.lq)((0,s.zM)())})}};
//# sourceMappingURL=90742.a48b7a8149e482ec.js.map