export const __rspack_esm_id="90742";export const __rspack_esm_ids=["90742"];export const __webpack_modules__={4757(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HuiMarkdownCardEditor:()=>f});var n=a(62826),i=a(96196),c=a(97735),s=a(22786),l=a(63533),r=a(1087),d=a(52763),_=a(91408),h=a(84698),p=a(999),u=e([d,p]);[d,p]=u.then?(await u)():u;const m="M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z",g=["navigate","url","perform-action","none"],y=(0,l.kp)(h.H,(0,l.Ik)({text_only:(0,l.lq)((0,l.zM)()),title:(0,l.lq)((0,l.Yj)()),content:(0,l.Yj)(),tap_action:(0,l.lq)((0,p.W0)(_.kn,g)),hold_action:(0,l.lq)((0,p.W0)(_.kn,g)),double_tap_action:(0,l.lq)((0,p.W0)(_.kn,g))}));class f extends i.WF{setConfig(e){(0,l.vA)(e,y),this._config=e}render(){if(!this.hass||!this._config)return i.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 i.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,r.r)(this,"config-changed",{config:t})}constructor(...e){super(...e),this._schema=(0,s.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:{preview:!1}}},{name:"interactions",type:"expandable",flatten:!0,iconPath:m,schema:[{name:"actions_warning",type:"constant"},{name:"tap_action",selector:{ui_action:{actions:g,default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map(e=>({name:e,selector:{ui_action:{actions:g,default_action:"none"}}}))}]}]),this._computeLabelCallback=e=>{switch(e.name){case"style":case"content":return this.hass.localize(`ui.panel.lovelace.editor.card.markdown.${e.name}`);case"interactions":return this.hass.localize("ui.panel.lovelace.editor.card.generic.interactions");case"actions_warning":return this.hass.localize("ui.panel.lovelace.editor.card.markdown.actions_warning");case"tap_action":case"hold_action":case"double_tap_action":return`${this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)} (${this.hass.localize("ui.panel.lovelace.editor.card.config.optional")})`;default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,n.Cg)([(0,c.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,n.Cg)([(0,c.wk)()],f.prototype,"_config",void 0),f=(0,n.Cg)([(0,c.EM)("hui-markdown-card-editor")],f),o()}catch(e){o(e)}})},84698(e,t,a){a.d(t,{H:()=>n});var o=a(63533);const n=(0,o.Ik)({type:(0,o.Yj)(),view_layout:(0,o.bz)(),layout_options:(0,o.bz)(),grid_options:(0,o.bz)(),visibility:(0,o.bz)(),disabled:(0,o.lq)((0,o.zM)())})}};
//# sourceMappingURL=90742.b6c4a056dba32414.js.map