export const __rspack_esm_id="51603";export const __rspack_esm_ids=["51603"];export const __webpack_modules__={44830(e,t,i){i.r(t),i.d(t,{CommonControlsSectionStrategy:()=>l});i(44114),i(18111),i(22489),i(61701);var n=i(62826),s=i(96196),o=i(44457),c=i(36312);class l extends s.mN{static async generate(e,t){const i={type:"grid",cards:[]};if(e.title&&i.cards?.push({type:"heading",heading:e.title,icon:e.icon,visibility:e.title_visibilty}),!(0,c.x)(t,"usage_prediction"))return i.cards.push({type:"markdown",content:t.localize("ui.panel.lovelace.strategy.common_controls.not_loaded")}),i.disabled=e.hide_empty,i;const n=await(e=>e.callWS({type:"usage_prediction/common_control"}))(t);let s=n.entities.filter(e=>e in t.states);e.exclude_entities?.length&&(s=s.filter(t=>!e.exclude_entities.includes(t))),e.include_entities?.length&&(s=s.filter(t=>!e.include_entities.includes(t)),s.unshift(...e.include_entities.filter(e=>e in t.states)));const o=e.limit??8;return s=s.slice(0,o),s.length>0?i.cards.push(...s.map(e=>({type:"tile",entity:e,show_entity_picture:!0}))):(i.cards.push({type:"markdown",content:t.localize("ui.panel.lovelace.strategy.common_controls.no_data")}),i.disabled=e.hide_empty),i}}l=(0,n.Cg)([(0,o.EM)("common-controls-section-strategy")],l)}};
//# sourceMappingURL=51603.024d861b00797d31.js.map