"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["2202"],{97889:function(t,a,i){i.a(t,async function(t,s){try{i.r(a);var e=i(40445),n=i(96196),c=i(77845),l=i(18350),h=t([l]);l=(h.then?(await h)():h)[0];let o,r,p,u,d,b=t=>t;class $ extends n.WF{render(){return this.hass&&this.stateObj?(0,n.qy)(o||(o=b` <div class="actions"> ${0} ${0} ${0} </div> `),"idle"===this.stateObj.state||"paused"===this.stateObj.state?(0,n.qy)(r||(r=b` <ha-button appearance="plain" size="small" .action="${0}" @click="${0}"> ${0} </ha-button> `),"start",this._handleActionClick,this.hass.localize("ui.card.timer.actions.start")):"","active"===this.stateObj.state?(0,n.qy)(p||(p=b` <ha-button appearance="plain" size="small" .action="${0}" @click="${0}"> ${0} </ha-button> `),"pause",this._handleActionClick,this.hass.localize("ui.card.timer.actions.pause")):"","active"===this.stateObj.state||"paused"===this.stateObj.state?(0,n.qy)(u||(u=b` <ha-button appearance="plain" size="small" .action="${0}" @click="${0}"> ${0} </ha-button> <ha-button appearance="plain" size="small" .action="${0}" @click="${0}"> ${0} </ha-button> `),"cancel",this._handleActionClick,this.hass.localize("ui.card.timer.actions.cancel"),"finish",this._handleActionClick,this.hass.localize("ui.card.timer.actions.finish")):""):n.s6}_handleActionClick(t){const a=t.currentTarget.action;this.hass.callService("timer",a,{entity_id:this.stateObj.entity_id})}}$.styles=(0,n.AH)(d||(d=b`.actions{margin:var(--ha-space-2) 0;display:flex;flex-wrap:wrap;justify-content:center}`)),(0,e.Cg)([(0,c.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,e.Cg)([(0,c.MZ)({attribute:!1})],$.prototype,"stateObj",void 0),$=(0,e.Cg)([(0,c.EM)("more-info-timer")],$),s()}catch(o){s(o)}})}}]);
//# sourceMappingURL=2202.805b0664c689a618.js.map