"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[48339],{60094:function(e,t,a){a.a(e,async function(e,n){try{a.r(t);var o,c=a(28430),i=a(97058),r=a(74512),l=a(57567),s=a(25979),u=a(12463),d=a(16472),_=(a(28706),a(62062),a(26099),a(27495),a(25440),a(15697)),h=a(57527),p=a(51209),f=a(90789),m=a(49588),g=a(148),v=a(55682),y=a(26041),k=a(30013),C=a(87226),b=e([v,C]);[v,C]=b.then?(await b)():b;var A=["navigate","url","perform-action","none"],w=(0,m.kp)(k.H,(0,m.Ik)({text_only:(0,m.lq)((0,m.zM)()),title:(0,m.lq)((0,m.Yj)()),content:(0,m.Yj)(),tap_action:(0,m.lq)((0,C.W0)(y.kn,A)),hold_action:(0,m.lq)((0,C.W0)(y.kn,A)),double_tap_action:(0,m.lq)((0,C.W0)(y.kn,A))})),z=function(e){function t(){var e;(0,l.A)(this,t);for(var a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];return(e=(0,d.A)(this,t,[].concat(n)))._schema=(0,f.A)(function(e,t){return[{name:"style",required:!0,selector:{select:{mode:"box",options:["card","text-only"].map(function(t){return{label:e("ui.panel.lovelace.editor.card.markdown.style_options.".concat(t)),image:{src:"/static/images/form/markdown_".concat(t.replace("-","_"),".svg"),src_dark:"/static/images/form/markdown_".concat(t.replace("-","_"),"_dark.svg"),flip_rtl:!0},value:t}})}}}].concat((0,r.A)(t?[]:[{name:"title",selector:{text:{}}}]),[{name:"content",required:!0,selector:{template:{preview:!1}}},{name:"interactions",type:"expandable",flatten:!0,iconPath:"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",schema:[{name:"actions_warning",type:"constant"},{name:"tap_action",selector:{ui_action:{actions:A,default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map(function(e){return{name:e,selector:{ui_action:{actions:A,default_action:"none"}}}})}]}])}),e._computeLabelCallback=function(t){switch(t.name){case"style":case"content":return e.hass.localize("ui.panel.lovelace.editor.card.markdown.".concat(t.name));case"interactions":return e.hass.localize("ui.panel.lovelace.editor.card.generic.interactions");case"actions_warning":return e.hass.localize("ui.panel.lovelace.editor.card.markdown.actions_warning");case"tap_action":case"hold_action":case"double_tap_action":return"".concat(e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))," (").concat(e.hass.localize("ui.panel.lovelace.editor.card.config.optional"),")");default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,u.A)(t,e),(0,s.A)(t,[{key:"setConfig",value:function(e){(0,m.vA)(e,w),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return h.s6;var e=(0,i.A)((0,i.A)({},this._config),{},{style:this._config.text_only?"text-only":"card"}),t=this._schema(this.hass.localize,this._config.text_only||!1);return(0,h.qy)(o||(o=(0,c.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," @value-changed=","></ha-form> "])),this.hass,e,t,this._computeLabelCallback,this._valueChanged)}},{key:"_valueChanged",value:function(e){var t=(0,i.A)({},e.detail.value);"text-only"===t.style?t.text_only=!0:delete t.text_only,delete t.style,(0,g.r)(this,"config-changed",{config:t})}}])}(h.WF);(0,_.Cg)([(0,p.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,_.Cg)([(0,p.wk)()],z.prototype,"_config",void 0),z=(0,_.Cg)([(0,p.EM)("hui-markdown-card-editor")],z),a.d(t,{HuiMarkdownCardEditor:function(){return z}}),n()}catch(x){n(x)}})},30013:function(e,t,a){var n=a(49588),o=(0,n.Ik)({type:(0,n.Yj)(),view_layout:(0,n.bz)(),layout_options:(0,n.bz)(),grid_options:(0,n.bz)(),visibility:(0,n.bz)(),disabled:(0,n.lq)((0,n.zM)())});a.d(t,{H:function(){return o}})}}]);
//# sourceMappingURL=48339.57f954de1dfbb1eb.js.map