export const __rspack_esm_id=24527;export const __rspack_esm_ids=[24527];export const __webpack_modules__={9202(t,a,e){e.a(t,async function(t,i){try{e.r(a);var o=e(15697),n=e(57527),s=e(79224),c=e(90789),l=e(49588),r=e(148),h=e(55682),_=e(62672),d=e(58076),p=e(11071),u=e(26041),f=e(93566),m=e(13263),g=t([h,d]);[h,d]=g.then?(await g)():g;const v="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",b="M4,9H20V11H4V9M4,13H14V15H4V13Z",C=["navigate","url","assist","perform-action","none"],y=(0,l.kp)(f.y,(0,l.Ik)({text:(0,l.lq)((0,l.Yj)()),icon:(0,l.lq)((0,l.Yj)()),color:(0,l.lq)((0,l.Yj)()),tap_action:(0,l.lq)(u.kn),hold_action:(0,l.lq)(u.kn),double_tap_action:(0,l.lq)(u.kn)}));class k extends n.WF{setConfig(t){(0,l.vA)(t,y),this._config=t}willUpdate(t){if((t.has("hass")||t.has("_config"))&&this.hass){const t=this._config?.tap_action;this._navInfo.update(this.hass,"navigate"===t?.action?t.navigation_path:void 0),this._serviceInfo.updateService("perform-action"===t?.action||"call-service"===t?.action?t.perform_action||t.service:void 0)}}render(){if(!this.hass||!this._config)return n.s6;const t=(0,p.J)(this.hass,this._config.tap_action,this._navInfo.info,this._serviceInfo.info);return n.qy` <ha-form .hass=${this.hass} .data=${this._config} .schema=${this._schema(t.label,t.icon)} .computeLabel=${this._computeLabelCallback} @value-changed=${this._valueChanged}></ha-form> `}_valueChanged(t){t.stopPropagation(),this._config&&this.hass&&(0,r.r)(this,"config-changed",{config:t.detail.value})}constructor(...t){super(...t),this._navInfo=new _.q(this),this._serviceInfo=new d.G(this),this._schema=(0,c.A)((t,a)=>[{name:"tap_action",selector:{ui_action:{default_action:"none",actions:C}}},{name:"content",flatten:!0,type:"expandable",expanded:!0,iconPath:b,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:v,schema:[{name:"hold_action",selector:{ui_action:{default_action:"none",actions:C}}},{name:"double_tap_action",selector:{ui_action:{default_action:"none",actions:C}}}]}]),this._computeLabelCallback=t=>{switch(t.name){case"text":case"additional_interactions":return this.hass.localize(`ui.panel.lovelace.editor.card.shortcut.${t.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}}}k.styles=m.U,(0,o.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],k.prototype,"_config",void 0),k=(0,o.Cg)([(0,s.EM)("hui-shortcut-badge-editor")],k),e.d(a,{HuiShortcutBadgeEditor:()=>k}),i()}catch(t){i(t)}})},93566(t,a,e){var i=e(49588);const o=(0,i.Ik)({type:(0,i.Yj)(),visibility:(0,i.bz)(),disabled:(0,i.lq)((0,i.zM)())});e.d(a,{},{y:o})}};
//# sourceMappingURL=24527.2b9c65b0a42f688d.js.map