"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["90742"],{4757:function(e,t,a){a.r(t),a.d(t,{HuiMarkdownCardEditor:function(){return p}});var n,o=a(72153),i=a(7739),c=a(44734),r=a(43080),s=a(69683),l=a(6454),u=(a(28706),a(62062),a(69085),a(26099),a(27495),a(25440),a(40445)),d=a(96196),h=a(77845),f=a(22786),_=a(63533),m=a(1087),g=(a(52763),a(84698)),y=(0,_.kp)(g.H,(0,_.Ik)({text_only:(0,_.lq)((0,_.zM)()),title:(0,_.lq)((0,_.Yj)()),content:(0,_.Yj)()})),p=function(e){function t(){var e;(0,c.A)(this,t);for(var a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];return(e=(0,s.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,i.A)(t?[]:[{name:"title",selector:{text:{}}}]),[{name:"content",required:!0,selector:{template:{}}}])}),e._computeLabelCallback=function(t){switch(t.name){case"style":case"content":return e.hass.localize("ui.panel.lovelace.editor.card.markdown.".concat(t.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"setConfig",value:function(e){(0,_.vA)(e,y),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return d.s6;var e=Object.assign(Object.assign({},this._config),{},{style:this._config.text_only?"text-only":"card"}),t=this._schema(this.hass.localize,this._config.text_only||!1);return(0,d.qy)(n||(n=(0,o.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=Object.assign({},e.detail.value);"text-only"===t.style?t.text_only=!0:delete t.text_only,delete t.style,(0,m.r)(this,"config-changed",{config:t})}}])}(d.WF);(0,u.Cg)([(0,h.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,u.Cg)([(0,h.wk)()],p.prototype,"_config",void 0),p=(0,u.Cg)([(0,h.EM)("hui-markdown-card-editor")],p)},84698:function(e,t,a){a.d(t,{H:function(){return o}});var n=a(63533),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)())})}}]);
//# sourceMappingURL=90742.5bfd43611260a485.js.map