"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[38881],{55192:function(i,n,e){e.a(i,async function(i,t){try{e.r(n);var o,c,s,r,a,l=e(36854),h=e(98117),u=e(28430),d=e(57567),g=e(25979),f=e(12463),m=e(16472),_=(e(26099),e(3362),e(15697)),v=e(57527),p=e(51209),w=e(48612),k=e(88457),y=(e(75041),i([k]));k=(y.then?(await y)():y)[0];var z=function(i){function n(){return(0,d.A)(this,n),(0,m.A)(this,n,arguments)}return(0,f.A)(n,i),(0,g.A)(n,[{key:"setConfig",value:function(i){this._config=i,"analog"===i.clock_style?e.e(92685).then(e.bind(e,38236)):e.e(62531).then(e.bind(e,56622))}},{key:"getCardSize",value:function(){var i;return"small"===(null===(i=this._config)||void 0===i?void 0:i.clock_size)?1:2}},{key:"getGridOptions",value:function(){var i,n,e,t,o,c,s;if("analog"===(null===(i=this._config)||void 0===i?void 0:i.clock_style))switch(null===(n=this._config)||void 0===n?void 0:n.clock_size){case"medium":return{min_rows:null!==(e=this._config)&&void 0!==e&&e.title?4:3,rows:3,min_columns:5,columns:6};case"large":return{min_rows:null!==(t=this._config)&&void 0!==t&&t.title?5:4,rows:4,min_columns:6,columns:6};default:return{min_rows:null!==(o=this._config)&&void 0!==o&&o.title?3:2,rows:2,min_columns:2,columns:6}}switch(null===(c=this._config)||void 0===c?void 0:c.clock_size){case"medium":return{min_rows:null!==(s=this._config)&&void 0!==s&&s.title?2:1,rows:2,max_rows:4,min_columns:4,columns:6};case"large":return{min_rows:2,rows:2,max_rows:4,min_columns:6,columns:6};default:return{min_rows:1,rows:1,max_rows:4,min_columns:3,columns:6}}}},{key:"render",value:function(){var i;return this._config?(0,v.qy)(o||(o=(0,u.A)([" <ha-card class=",'> <div class="time-wrapper ','"> '," "," </div> </ha-card> "])),(0,w.H)({"no-background":null!==(i=this._config.no_background)&&void 0!==i&&i}),this._config.clock_size?"size-".concat(this._config.clock_size):"",void 0!==this._config.title?(0,v.qy)(c||(c=(0,u.A)(['<div class="time-title">',"</div>"])),this._config.title):v.s6,"analog"===this._config.clock_style?(0,v.qy)(s||(s=(0,u.A)([" <hui-clock-card-analog .hass="," .config=","></hui-clock-card-analog> "])),this.hass,this._config):(0,v.qy)(r||(r=(0,u.A)([" <hui-clock-card-digital .hass="," .config=","></hui-clock-card-digital> "])),this.hass,this._config)):v.s6}}],[{key:"getConfigElement",value:(t=(0,h.A)((0,l.A)().m(function i(){return(0,l.A)().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,e.e(42128).then(e.bind(e,73267));case 1:return i.a(2,document.createElement("hui-clock-card-editor"))}},i)})),function(){return t.apply(this,arguments)})},{key:"getStubConfig",value:function(){return{type:"clock"}}}]);var t}(v.WF);z.styles=(0,v.AH)(a||(a=(0,u.A)(["ha-card{height:100%}.no-background{box-shadow:none;background:0 0;border:none}.time-wrapper{flex-direction:column;justify-content:center;align-items:center;row-gap:6px;height:calc(100% - 12px);padding:6px 8px;display:flex}.time-wrapper.size-medium,.time-wrapper.size-large{row-gap:var(--ha-space-3);height:calc(100% - 32px);padding:16px}.time-title{color:var(--primary-text-color);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden}.time-wrapper.size-medium .time-title{font-size:var(--ha-font-size-l);line-height:var(--ha-line-height-condensed)}.time-wrapper.size-large .time-title{font-size:var(--ha-font-size-2xl);line-height:var(--ha-line-height-condensed)}"]))),(0,_.Cg)([(0,p.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,_.Cg)([(0,p.wk)()],z.prototype,"_config",void 0),z=(0,_.Cg)([(0,p.EM)("hui-clock-card")],z),e.d(n,{HuiClockCard:function(){return z}}),t()}catch(x){t(x)}})}}]);
//# sourceMappingURL=38881.775e982500e32dd4.js.map