export const __rspack_esm_id=66766;export const __rspack_esm_ids=[66766];export const __webpack_modules__={92957(e,t,a){a.a(e,async function(e,i){try{a.r(t);var s=a(15697),c=a(57527),o=a(79224),n=a(90789),r=a(49588),l=a(148),h=a(55682),d=a(47872),v=e([h,d]);[h,d]=v.then?(await v)():v;const _=(0,r.Ik)({type:(0,r.vP)(["service-button","action-button"]),style:(0,r.lq)((0,r.bz)()),title:(0,r.lq)((0,r.Yj)()),action:(0,r.lq)((0,r.Yj)()),service:(0,r.lq)((0,r.Yj)()),service_data:(0,r.lq)((0,r.bz)()),data:(0,r.lq)((0,r.bz)()),target:(0,r.lq)((0,r.bz)())}),g=[{name:"title",required:!0,selector:{text:{}}},{name:"style",selector:{object:{}}}];class u extends c.WF{setConfig(e){(0,r.vA)(e,_),this._config=e}render(){return this.hass&&this._config?c.qy` <ha-form .hass=${this.hass} .data=${this._config} .schema=${g} .computeLabel=${this._computeLabelCallback} @value-changed=${this._valueChanged}></ha-form> <ha-service-control .hass=${this.hass} .value=${this._serviceData(this._config)} narrow @value-changed=${this._serviceDataChanged}></ha-service-control> `:c.s6}_valueChanged(e){(0,l.r)(this,"config-changed",{config:{...this._config,...e.detail.value}})}_serviceDataChanged(e){const t={...this._config,action:e.detail.value.action,data:e.detail.value.data,target:e.detail.value.target};"service"in t&&delete t.service,"service_data"in t&&delete t.service_data,(0,l.r)(this,"config-changed",{config:t})}constructor(...e){super(...e),this._serviceData=(0,n.A)(e=>({action:e?.action??e?.service,data:e?.data??e?.service_data,target:e?.target})),this._computeLabelCallback=e=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)||this.hass.localize(`ui.panel.lovelace.editor.elements.${e.name}`)||e.name}}u.styles=c.AH`ha-service-control{--service-control-padding:0;margin-top:16px;display:block}`,(0,s.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,s.Cg)([(0,o.wk)()],u.prototype,"_config",void 0),u=(0,s.Cg)([(0,o.EM)("hui-service-button-element-editor")],u),a.d(t,{HuiServiceButtonElementEditor:()=>u}),i()}catch(e){i(e)}})}};
//# sourceMappingURL=66766.93ce40966dc0333e.js.map