export const __rspack_esm_id=10489;export const __rspack_esm_ids=[10489];export const __webpack_modules__={1307(t,e,i){var a=i(81711);function o(t,e,i,a){if(!i||!i.action||"none"===i.action)return"";let o=a?t.localize("ui.panel.lovelace.cards.picture-elements.hold"):t.localize("ui.panel.lovelace.cards.picture-elements.tap");switch(i.action){case"navigate":o+=` ${t.localize("ui.panel.lovelace.cards.picture-elements.navigate_to",{location:i.navigation_path})}`;break;case"url":o+=` ${t.localize("ui.panel.lovelace.cards.picture-elements.url",{url_path:i.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:i.service})}`;break;case"more-info":o+=`${t.localize("ui.panel.lovelace.cards.picture-elements.more_info",{name:e})}`}return o}i.d(e,{},{d:(t,e)=>{if(null===e.title)return"";if(e.title)return e.title;let i="";if(e.entity&&(i=e.entity in t.states?(0,a.u)(t.states[e.entity]):e.entity),!e.tap_action&&!e.hold_action)return i;const n=e.tap_action?o(t,i,e.tap_action,!1):"",r=e.hold_action?o(t,i,e.hold_action,!0):"";return n+(n&&r?"\n":"")+r}})},77561(t,e,i){i.a(t,async function(t,e){try{i(18111),i(61701);var a=i(15697),o=i(358),n=i(57527),r=i(79224),s=i(49938),c=i(67259),l=i(81711),d=i(18734),p=i(80189),h=i(1307),u=i(14936),g=i(42239),_=i(49511),b=(i(25695),i(8552),i(76730)),y=t([d]);d=(y.then?(await y)():y)[0];class f extends n.WF{render(){return n.qy` <ha-chip-set class="ha-scrollbar"> ${(this.configEntities||[]).map(t=>{const e=this._entityStates[t.entity],i=t.show_name&&e||t.name&&!1!==t.show_name?t.name||(e?(0,l.u)(e):""):"";return n.qy` <ha-assist-chip filled @action=${this._handleAction} .actionHandler=${(0,u.T)({hasHold:(0,_.h)(t.hold_action),hasDoubleClick:(0,_.h)(t.double_tap_action)})} .config=${t} tabindex="0" .label=${i}> ${!1!==t.show_icon?n.qy` <state-badge title=${(0,h.d)(this.hass,t)} .stateObj=${e} .overrideIcon=${t.icon} .overrideImage=${t.image} .stateColor=${!0} slot="icon"></state-badge> `:""} </ha-assist-chip> `})} </ha-chip-set> `}_handleAction(t){(0,g.$)(this,this.hass,t.currentTarget.config,t.detail.action)}static get styles(){return[b.dp,n.AH`.ha-scrollbar{padding:12px;padding-top:var(--padding-top,8px);padding-bottom:var(--padding-bottom,8px);white-space:nowrap;box-sizing:border-box;flex-wrap:wrap;width:100%;display:flex;overflow:auto hidden}state-badge{line-height:inherit;color:var(--secondary-text-color);justify-content:center;align-items:center;display:inline-flex}@media (width<=450px),(height<=500px){.ha-scrollbar{flex-wrap:nowrap}}`]}constructor(...t){super(...t),this._entityStates={}}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"configEntities",void 0),(0,a.Cg)([(0,r.wk)(),(0,o.Fg)({context:p.iN,subscribe:!0}),(0,c.p)({transformer:function(t){const e={};if(t)for(const i of this.configEntities||[])e[i.entity]=t[i.entity];return(0,s.gu)(this._entityStates,e)},watch:["configEntities"]})],f.prototype,"_entityStates",void 0),f=(0,a.Cg)([(0,r.EM)("hui-buttons-base")],f),e()}catch(t){e(t)}})},91264(t,e,i){i.a(t,async function(t,a){try{i.r(e);i(18111),i(61701);var o=i(15697),n=i(57527),r=i(97901),s=i(79224),c=i(45602),l=i(13010),d=i(77561),p=t([d]);d=(p.then?(await p)():p)[0];class h extends n.WF{static getStubConfig(){return{entities:[]}}getCardSize(){return 3}setConfig(t){this._configEntities=(0,l.L)(t.entities).map(t=>{const e={tap_action:{action:"toggle"},hold_action:{action:"more-info"},...t};return"scene"===(0,c.m)(t.entity)&&(e.tap_action={action:"call-service",service:"scene.turn_on",target:{entity_id:e.entity}}),e})}render(){return n.qy` ${"footer"===this.type?n.qy`<li class="divider footer" role="separator"></li>`:""} <hui-buttons-base .hass=${this.hass} .configEntities=${this._configEntities} class=${(0,r.H)({footer:"footer"===this.type,header:"header"===this.type})}></hui-buttons-base> ${"header"===this.type?n.qy`<li class="divider header" role="separator"></li>`:""} `}}h.styles=n.AH`.divider{border:none;border-bottom:1px solid;border-bottom-color:var(--divider-color);height:0;margin:16px 0;list-style-type:none}.divider.header{margin-top:0}hui-buttons-base.footer{--padding-bottom:16px}hui-buttons-base.header{--padding-top:16px}`,(0,o.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,s.MZ)()],h.prototype,"type",void 0),(0,o.Cg)([(0,s.wk)()],h.prototype,"_configEntities",void 0),h=(0,o.Cg)([(0,s.EM)("hui-buttons-header-footer")],h),i.d(e,{HuiButtonsHeaderFooter:()=>h}),a()}catch(t){a(t)}})}};
//# sourceMappingURL=10489.f330462292242155.js.map