"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[19718],{91717:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);var n,s,c=i(28430),r=i(57567),o=i(25979),u=i(12463),l=i(16472),h=(i(2892),i(15697)),d=i(358),b=i(57527),p=i(51209),_=i(49938),m=i(98747),f=i(80189),k=i(96682),v=t([m]);m=(v.then?(await v)():v)[0];var y=function(t){function e(){return(0,r.A)(this,e),(0,l.A)(this,e,arguments)}return(0,u.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){if(!this._localize||!this.stateObj)return b.s6;var t=this.stateObj.state===k.Hh;return(0,b.qy)(n||(n=(0,c.A)([' <div class="actions"> <ha-button appearance="plain" size="s" .action='," @click="," .disabled=","> ",' </ha-button> <ha-button appearance="plain" size="s" .action='," @click="," .disabled=","> ",' </ha-button> <ha-button appearance="plain" size="s" .action='," @click="," .disabled=","> "," </ha-button> </div> "])),"increment",this._handleActionClick,t||Number(this.stateObj.state)===this.stateObj.attributes.maximum,this._localize("ui.card.counter.actions.increment"),"decrement",this._handleActionClick,t||Number(this.stateObj.state)===this.stateObj.attributes.minimum,this._localize("ui.card.counter.actions.decrement"),"reset",this._handleActionClick,t,this._localize("ui.card.counter.actions.reset"))}},{key:"_handleActionClick",value:function(t){var e=t.currentTarget.action;this._api.callService("counter",e,{entity_id:this.stateObj.entity_id})}}])}(b.WF);y.styles=(0,b.AH)(s||(s=(0,c.A)([".actions{margin:var(--ha-space-2) 0;flex-wrap:wrap;justify-content:center;display:flex}"]))),(0,h.Cg)([(0,p.MZ)({attribute:!1})],y.prototype,"stateObj",void 0),(0,h.Cg)([(0,p.wk)(),(0,_.IW)()],y.prototype,"_localize",void 0),(0,h.Cg)([(0,p.wk)(),(0,d.Fg)({context:f.Ie,subscribe:!0})],y.prototype,"_api",void 0),y=(0,h.Cg)([(0,p.EM)("more-info-counter")],y),a()}catch(A){a(A)}})}}]);
//# sourceMappingURL=19718.46a814115451f2ef.js.map