"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["11546"],{56833:function(i,e,t){t.a(i,async function(i,n){try{t.r(e),t.d(e,{HuiClockCard:function(){return _}});t(3362),t(62953);var o=t(40445),s=t(96196),c=t(77845),a=t(94333),r=t(38962),l=(t(76776),i([r]));r=(l.then?(await l)():l)[0];let h,d,g,u,m,f=i=>i;class _ extends s.WF{static async getConfigElement(){return await t.e("38611").then(t.bind(t,22686)),document.createElement("hui-clock-card-editor")}static getStubConfig(){return{type:"clock"}}setConfig(i){this._config=i,"analog"===i.clock_style?t.e("79192").then(t.bind(t,54603)):t.e("43388").then(t.bind(t,41367))}getCardSize(){var i;return"small"===(null===(i=this._config)||void 0===i?void 0:i.clock_size)?1:2}getGridOptions(){var i,e,t,n,o,s,c;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!==(t=this._config)&&void 0!==t&&t.title?4:3,rows:3,min_columns:5,columns:6};case"large":return{min_rows:null!==(n=this._config)&&void 0!==n&&n.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===(s=this._config)||void 0===s?void 0:s.clock_size){case"medium":return{min_rows:null!==(c=this._config)&&void 0!==c&&c.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}}}render(){var i;return this._config?(0,s.qy)(h||(h=f` <ha-card class="${0}"> <div class="time-wrapper ${0}"> ${0} ${0} </div> </ha-card> `),(0,a.H)({"no-background":null!==(i=this._config.no_background)&&void 0!==i&&i}),this._config.clock_size?`size-${this._config.clock_size}`:"",void 0!==this._config.title?(0,s.qy)(d||(d=f`<div class="time-title">${0}</div>`),this._config.title):s.s6,"analog"===this._config.clock_style?(0,s.qy)(g||(g=f` <hui-clock-card-analog .hass="${0}" .config="${0}"></hui-clock-card-analog> `),this.hass,this._config):(0,s.qy)(u||(u=f` <hui-clock-card-digital .hass="${0}" .config="${0}"></hui-clock-card-digital> `),this.hass,this._config)):s.s6}}_.styles=(0,s.AH)(m||(m=f`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,o.Cg)([(0,c.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,o.Cg)([(0,c.wk)()],_.prototype,"_config",void 0),_=(0,o.Cg)([(0,c.EM)("hui-clock-card")],_),n()}catch(h){n(h)}})}}]);
//# sourceMappingURL=11546.c6e6e4832dd34099.js.map