"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["17813"],{97588:function(t,i,e){e.r(i),e.d(i,{HuiPictureHeaderFooter:function(){return _}});e(16280);var o=e(40445),s=e(96196),a=e(77845),n=e(94333),r=e(32288),h=(e(76776),e(19037)),c=e(37544),l=e(97176);let d,g,u=t=>t;class _ extends s.WF{static getStubConfig(){return{image:"https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png",tap_action:{action:"none"},hold_action:{action:"none"}}}getCardSize(){return 3}setConfig(t){if(!t||!t.image)throw new Error("Image required");this._config=t}shouldUpdate(t){return 1!==t.size||!t.has("hass")||!t.get("hass")}render(){var t;if(!this._config||!this.hass)return s.s6;const i=Boolean(this._config.tap_action||this._config.hold_action);return(0,s.qy)(d||(d=u` <img alt="${0}" @action="${0}" .actionHandler="${0}" tabindex="${0}" class="${0}" src="${0}"> `),(0,r.J)(null===(t=this._config)||void 0===t?void 0:t.alt_text),this._handleAction,(0,h.T)({hasHold:(0,l.h)(this._config.hold_action),hasDoubleClick:(0,l.h)(this._config.double_tap_action)}),(0,r.J)(i?0:void 0),(0,n.H)({clickable:i}),this.hass.hassUrl(this._config.image))}_handleAction(t){(0,c.$)(this,this.hass,this._config,t.detail.action)}}_.styles=(0,s.AH)(g||(g=u`img.clickable{cursor:pointer}img{display:block;width:100%}`)),(0,o.Cg)([(0,a.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,o.Cg)([(0,a.MZ)()],_.prototype,"type",void 0),(0,o.Cg)([(0,a.wk)()],_.prototype,"_config",void 0),_=(0,o.Cg)([(0,a.EM)("hui-picture-header-footer")],_)}}]);
//# sourceMappingURL=17813.f92cd1ca1d65b660.js.map