"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["11546"],{56833:function(i,e,n){n.r(e),n.d(e,{HuiClockCard:function(){return w}});var t,o,c,s,r,a=n(61397),l=n(50264),u=n(72153),h=n(44734),d=n(43080),g=n(69683),f=n(6454),m=(n(23792),n(26099),n(3362),n(47764),n(62953),n(40445)),_=n(96196),v=n(77845),p=n(94333),w=(n(38962),n(76776),function(i){function e(){return(0,h.A)(this,e),(0,g.A)(this,e,arguments)}return(0,f.A)(e,i),(0,d.A)(e,[{key:"setConfig",value:function(i){this._config=i,"analog"===i.clock_style?n.e("79192").then(n.bind(n,54603)):n.e("43388").then(n.bind(n,41367))}},{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,e,n,t,o,c,s;if("analog"===(null===(i=this._config)||void 0===i?void 0:i.clock_style))switch(null===(e=this._config)||void 0===e?void 0:e.clock_size){case"medium":return{min_rows:null!==(n=this._config)&&void 0!==n&&n.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,_.qy)(t||(t=(0,u.A)([' <ha-card class="','"> <div class="time-wrapper ','"> '," "," </div> </ha-card> "])),(0,p.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,_.qy)(o||(o=(0,u.A)(['<div class="time-title">',"</div>"])),this._config.title):_.s6,"analog"===this._config.clock_style?(0,_.qy)(c||(c=(0,u.A)([' <hui-clock-card-analog .hass="','" .config="','"></hui-clock-card-analog> '])),this.hass,this._config):(0,_.qy)(s||(s=(0,u.A)([' <hui-clock-card-digital .hass="','" .config="','"></hui-clock-card-digital> '])),this.hass,this._config)):_.s6}}],[{key:"getConfigElement",value:(r=(0,l.A)((0,a.A)().m(function i(){return(0,a.A)().w(function(i){for(;;)switch(i.n){case 0:return i.n=1,n.e("38611").then(n.bind(n,22686));case 1:return i.a(2,document.createElement("hui-clock-card-editor"))}},i)})),function(){return r.apply(this,arguments)})},{key:"getStubConfig",value:function(){return{type:"clock"}}}]);var r}(_.WF));w.styles=(0,_.AH)(r||(r=(0,u.A)(["ha-card{height:100%}.no-background{background:0 0;box-shadow:none;border:none}.time-wrapper{display:flex;height:calc(100% - 12px);align-items:center;flex-direction:column;justify-content:center;padding:6px 8px;row-gap:6px}.time-wrapper.size-large,.time-wrapper.size-medium{height:calc(100% - 32px);padding:16px;row-gap:var(--ha-space-3)}.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);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.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,m.Cg)([(0,v.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,m.Cg)([(0,v.wk)()],w.prototype,"_config",void 0),w=(0,m.Cg)([(0,v.EM)("hui-clock-card")],w)}}]);
//# sourceMappingURL=11546.bde2af021184438c.js.map