"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[24527],{9202:function(t,a,n){n.a(t,async function(t,e){try{n.r(a);var i,o=n(28430),c=n(57567),s=n(25979),l=n(12463),r=n(40227),h=n(16472),u=(n(28706),n(15697)),d=n(57527),f=n(51209),_=n(90789),v=n(49588),p=n(148),m=n(55682),g=n(62672),y=n(58076),k=n(11071),C=n(26041),A=n(93566),b=n(13263),q=t([m,y]);[m,y]=q.then?(await q)():q;var V=["navigate","url","assist","perform-action","none"],I=(0,v.kp)(A.y,(0,v.Ik)({text:(0,v.lq)((0,v.Yj)()),icon:(0,v.lq)((0,v.Yj)()),color:(0,v.lq)((0,v.Yj)()),tap_action:(0,v.lq)(C.kn),hold_action:(0,v.lq)(C.kn),double_tap_action:(0,v.lq)(C.kn)})),L=function(t){function a(){var t;(0,c.A)(this,a);for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];return(t=(0,h.A)(this,a,[].concat(e)))._navInfo=new g.q((0,r.A)(t)),t._serviceInfo=new y.G((0,r.A)(t)),t._schema=(0,_.A)(function(t,a){return[{name:"tap_action",selector:{ui_action:{default_action:"none",actions:V}}},{name:"content",flatten:!0,type:"expandable",expanded:!0,iconPath:"M4,9H20V11H4V9M4,13H14V15H4V13Z",schema:[{name:"text",selector:{text:{placeholder:t}}},{name:"",type:"grid",schema:[{name:"icon",selector:{icon:{placeholder:a||"mdi:link"}}},{name:"color",selector:{ui_color:{default_color:"primary"}}}]}]},{name:"additional_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:"hold_action",selector:{ui_action:{default_action:"none",actions:V}}},{name:"double_tap_action",selector:{ui_action:{default_action:"none",actions:V}}}]}]}),t._computeLabelCallback=function(a){switch(a.name){case"text":case"additional_interactions":return t.hass.localize("ui.panel.lovelace.editor.card.shortcut.".concat(a.name));default:return t.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(a.name))}},t}return(0,l.A)(a,t),(0,s.A)(a,[{key:"setConfig",value:function(t){(0,v.vA)(t,I),this._config=t}},{key:"willUpdate",value:function(t){if((t.has("hass")||t.has("_config"))&&this.hass){var a,n=null===(a=this._config)||void 0===a?void 0:a.tap_action;this._navInfo.update(this.hass,"navigate"===(null==n?void 0:n.action)?n.navigation_path:void 0),this._serviceInfo.updateService("perform-action"===(null==n?void 0:n.action)||"call-service"===(null==n?void 0:n.action)?n.perform_action||n.service:void 0)}}},{key:"render",value:function(){if(!this.hass||!this._config)return d.s6;var t=(0,k.J)(this.hass,this._config.tap_action,this._navInfo.info,this._serviceInfo.info);return(0,d.qy)(i||(i=(0,o.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," @value-changed=","></ha-form> "])),this.hass,this._config,this._schema(t.label,t.icon),this._computeLabelCallback,this._valueChanged)}},{key:"_valueChanged",value:function(t){t.stopPropagation(),this._config&&this.hass&&(0,p.r)(this,"config-changed",{config:t.detail.value})}}])}(d.WF);L.styles=b.U,(0,u.Cg)([(0,f.MZ)({attribute:!1})],L.prototype,"hass",void 0),(0,u.Cg)([(0,f.wk)()],L.prototype,"_config",void 0),L=(0,u.Cg)([(0,f.EM)("hui-shortcut-badge-editor")],L),n.d(a,{HuiShortcutBadgeEditor:function(){return L}}),e()}catch(w){e(w)}})},93566:function(t,a,n){var e=n(49588),i=(0,e.Ik)({type:(0,e.Yj)(),visibility:(0,e.bz)(),disabled:(0,e.lq)((0,e.zM)())});n.d(a,{y:function(){return i}})}}]);
//# sourceMappingURL=24527.5d82197368532a2a.js.map