"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["16700"],{27722:function(t,e,a){a.d(e,{d:function(){return n}});var i=a(28978);function o(t,e,a,i){if(!a||!a.action||"none"===a.action)return"";let o=i?t.localize("ui.panel.lovelace.cards.picture-elements.hold"):t.localize("ui.panel.lovelace.cards.picture-elements.tap");switch(a.action){case"navigate":o+=` ${t.localize("ui.panel.lovelace.cards.picture-elements.navigate_to",{location:a.navigation_path})}`;break;case"url":o+=` ${t.localize("ui.panel.lovelace.cards.picture-elements.url",{url_path:a.url_path})}`;break;case"toggle":o+=` ${t.localize("ui.panel.lovelace.cards.picture-elements.toggle",{name:e})}`;break;case"call-service":o+=`${t.localize("ui.panel.lovelace.cards.picture-elements.perform_action",{name:a.service})}`;break;case"more-info":o+=`${t.localize("ui.panel.lovelace.cards.picture-elements.more_info",{name:e})}`}return o}const n=(t,e)=>{if(null===e.title)return"";if(e.title)return e.title;let a="",n="";if(e.entity&&(a=e.entity in t.states?(0,i.u)(t.states[e.entity]):e.entity),!e.tap_action&&!e.hold_action)return a;const s=e.tap_action?o(t,a,e.tap_action,!1):"",r=e.hold_action?o(t,a,e.hold_action,!0):"";return n=s+(s&&r?"\n":"")+r,n}},96314:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(61701);var i=a(40445),o=a(96196),n=a(77845),s=a(28978),r=a(74281),l=a(27722),c=a(19037),d=a(37544),h=a(97176),p=(a(34296),a(5745),a(14503)),u=t([r]);r=(u.then?(await u)():u)[0];let g,b,f,y,m=t=>t;class v extends o.WF{render(){return(0,o.qy)(g||(g=m` <ha-chip-set class="ha-scrollbar"> ${0} </ha-chip-set> `),(this.configEntities||[]).map(t=>{const e=this.hass.states[t.entity],a=t.show_name&&e||t.name&&!1!==t.show_name?t.name||(0,s.u)(e):"";return(0,o.qy)(b||(b=m` <ha-assist-chip filled @action="${0}" .actionHandler="${0}" .config="${0}" tabindex="0" .label="${0}"> ${0} </ha-assist-chip> `),this._handleAction,(0,c.T)({hasHold:(0,h.h)(t.hold_action),hasDoubleClick:(0,h.h)(t.double_tap_action)}),t,a,!1!==t.show_icon?(0,o.qy)(f||(f=m` <state-badge title="${0}" .hass="${0}" .stateObj="${0}" .overrideIcon="${0}" .overrideImage="${0}" .stateColor="${0}" slot="icon"></state-badge> `),(0,l.d)(this.hass,t),this.hass,e,t.icon,t.image,!0):"")}))}_handleAction(t){const e=t.currentTarget.config;(0,d.$)(this,this.hass,e,t.detail.action)}static get styles(){return[p.dp,(0,o.AH)(y||(y=m`.ha-scrollbar{padding:12px;padding-top:var(--padding-top,8px);padding-bottom:var(--padding-bottom,8px);width:100%;overflow-x:auto;overflow-y:hidden;white-space:nowrap;box-sizing:border-box;display:flex;flex-wrap:wrap}state-badge{display:inline-flex;line-height:inherit;color:var(--secondary-text-color);align-items:center;justify-content:center}@media all and (max-width:450px),all and (max-height:500px){.ha-scrollbar{flex-wrap:nowrap}}`))]}}(0,i.Cg)([(0,n.wk)()],v.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],v.prototype,"configEntities",void 0),v=(0,i.Cg)([(0,n.EM)("hui-buttons-base")],v),e()}catch(g){e(g)}})},72791:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{HuiButtonsHeaderFooter:function(){return y}});a(18111),a(61701);var o=a(40445),n=a(96196),s=a(94333),r=a(77845),l=a(71727),c=a(20939),d=a(96314),h=t([d]);d=(h.then?(await h)():h)[0];let p,u,g,b,f=t=>t;class y extends n.WF{static getStubConfig(){return{entities:[]}}getCardSize(){return 3}setConfig(t){this._configEntities=(0,c.L)(t.entities).map(t=>{const e=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t);return"scene"===(0,l.m)(t.entity)&&(e.tap_action={action:"call-service",service:"scene.turn_on",target:{entity_id:e.entity}}),e})}render(){return(0,n.qy)(p||(p=f` ${0} <hui-buttons-base .hass="${0}" .configEntities="${0}" class="${0}"></hui-buttons-base> ${0} `),"footer"===this.type?(0,n.qy)(u||(u=f`<li class="divider footer" role="separator"></li>`)):"",this.hass,this._configEntities,(0,s.H)({footer:"footer"===this.type,header:"header"===this.type}),"header"===this.type?(0,n.qy)(g||(g=f`<li class="divider header" role="separator"></li>`)):"")}}y.styles=(0,n.AH)(b||(b=f`.divider{height:0;margin:16px 0;list-style-type:none;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:var(--divider-color)}.divider.header{margin-top:0}hui-buttons-base.footer{--padding-bottom:16px}hui-buttons-base.header{--padding-top:16px}`)),(0,o.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)()],y.prototype,"type",void 0),(0,o.Cg)([(0,r.wk)()],y.prototype,"_configEntities",void 0),y=(0,o.Cg)([(0,r.EM)("hui-buttons-header-footer")],y),i()}catch(p){i(p)}})}}]);
//# sourceMappingURL=16700.674c09518761aa73.js.map