"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["60069"],{40932:function(t,a,e){e.a(t,async function(t,s){try{e.r(a);var i=e(40445),n=e(96196),c=e(77845),r=e(18350),o=e(22675),l=t([r]);r=(l.then?(await l)():l)[0];let h,u,d=t=>t;class b extends n.WF{render(){if(!this.hass||!this.stateObj)return n.s6;const t=(0,o.g0)(this.stateObj.state);return(0,n.qy)(h||(h=d` <div class="actions"> <ha-button appearance="plain" size="small" .action="${0}" @click="${0}" .disabled="${0}"> ${0} </ha-button> <ha-button appearance="plain" size="small" .action="${0}" @click="${0}" .disabled="${0}"> ${0} </ha-button> <ha-button appearance="plain" size="small" .action="${0}" @click="${0}" .disabled="${0}"> ${0} </ha-button> </div> `),"increment",this._handleActionClick,t||Number(this.stateObj.state)===this.stateObj.attributes.maximum,this.hass.localize("ui.card.counter.actions.increment"),"decrement",this._handleActionClick,t||Number(this.stateObj.state)===this.stateObj.attributes.minimum,this.hass.localize("ui.card.counter.actions.decrement"),"reset",this._handleActionClick,t,this.hass.localize("ui.card.counter.actions.reset"))}_handleActionClick(t){const a=t.currentTarget.action;this.hass.callService("counter",a,{entity_id:this.stateObj.entity_id})}}b.styles=(0,n.AH)(u||(u=d`.actions{margin:var(--ha-space-2) 0;display:flex;flex-wrap:wrap;justify-content:center}`)),(0,i.Cg)([(0,c.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,i.Cg)([(0,c.MZ)({attribute:!1})],b.prototype,"stateObj",void 0),b=(0,i.Cg)([(0,c.EM)("more-info-counter")],b),s()}catch(h){s(h)}})}}]);
//# sourceMappingURL=60069.a7d158821b4e2d1e.js.map