export const __rspack_esm_id=32399;export const __rspack_esm_ids=[32399];export const __webpack_modules__={68040(e,t,n){n(44114),n(18111),n(13579),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698);var i=n(56050),o=n(45602),a=n(15866);const s=e=>{if(void 0!==e)return null===e?new Set([null]):new Set((0,i.e)(e))};n.d(t,{},{B:(e,t)=>{const n=new Set,i=[];for(const o of t)for(const t of e)o(t)&&!n.has(t)&&(n.add(t),i.push(t));return i},r:(e,t)=>{const n=t.domain?new Set((0,i.e)(t.domain)):void 0,r=t.hidden_domains?new Set((0,i.e)(t.hidden_domains)):void 0,c=t.device_class?new Set((0,i.e)(t.device_class)):void 0,d=s(t.floor),l=s(t.area),_=s(t.device),u=t.entity_category?new Set((0,i.e)(t.entity_category)):void 0,f=t.label?new Set((0,i.e)(t.label)):void 0,p=t.hidden_platform?new Set((0,i.e)(t.hidden_platform)):void 0;return t=>{const i=e.states[t];if(!i)return!1;if(n||r){const e=(0,o.m)(t);if(n&&!n.has(e))return!1;if(r&&r.has(e))return!1}if(c){const e=i.attributes.device_class||"none";if(!c.has(e))return!1}const{area:s,floor:h,device:m,entity:v}=(0,a.ln)(i,e.entities,e.devices,e.areas,e.floors);if(v&&v.hidden)return!1;if(d){const e=h?.floor_id??null;if(!d.has(e))return!1}if(l){const e=s?.area_id??null;if(!l.has(e))return!1}if(_){const e=m?.id??null;if(!_.has(e))return!1}if(f){if(!v)return!1;if(!v.labels.some(e=>f.has(e)))return!1}if(u){const e=v?.entity_category||"none";if(!u.has(e))return!1}if(p){if(!v)return!1;if(v.platform&&p.has(v.platform))return!1}return!0}}})},91299(e,t,n){n.d(t,{},{O:(e,t,n)=>{let i;return i=null!=t?Math.max(e,t):e,i=null!=n?Math.min(i,n):i,i},q:(e,t,n)=>Math.min(Math.max(e,t),n)})},23102(e,t,n){const i=[{area:null,hidden_platform:["automation","script","hassio","backup","mobile_app","zone","person"],hidden_domains:["ai_task","automation","configurator","device_tracker","event","geo_location","notify","persistent_notification","script","sun","tag","todo","zone",...n(3899).gt]}];n.d(t,{},{B:i})},75314(e,t,n){n.r(t);n(44114),n(18111),n(22489),n(61701);var i=n(15697),o=n(57527),a=n(79224),s=n(87160),r=n(15866),c=n(68040),d=n(91299),l=n(23102);class _ extends o.mN{static async generate(e,t){const n=Object.keys(t.states),i=l.B.map(e=>(0,c.r)(t,e)),o=(0,c.B)(n,i),a=[],_={};for(const e of o){const n=t.states[e];if(!n)continue;const{device:i}=(0,r.ln)(n,t.entities,t.devices,t.areas,t.floors);i&&(i.id in _||(_[i.id]=[]),_[i.id].push(e))}const u=Object.entries(_).map(([e,t])=>({device_id:e,entities:t})),f=(0,c.r)(t,{entity_category:"none"});for(const n of u){if(0===n.entities.length)continue;const i=n.entities.filter(e=>f(e));if(0===i.length)continue;const o=n.device_id,r=t.devices[o];let c="";r&&(c=(0,s.xn)(r)||t.localize("ui.panel.lovelace.strategy.home.unnamed_device")),a.push({type:"grid",cards:[{type:"heading",heading:c,tap_action:r&&t.user?.is_admin?{action:"navigate",navigation_path:`/config/devices/device/${r.id}`}:{action:"none"},badges:[...e.home_panel&&r&&t.user?.is_admin?[{type:"button",icon:"mdi:home-plus",text:t.localize("ui.panel.lovelace.strategy.home-other-devices.assign_area"),tap_action:{action:"fire-dom-event",home_panel:{type:"assign_area",device_id:r.id}}}]:[]]},{type:"entities",entities:i.map(e=>({entity:e,name:{type:"entity"}}))}]})}const p=(0,d.q)(a.length,2,3);return 0===a.length?{type:"panel",cards:[{type:"empty-state",icon:"mdi:check-all",icon_color:"primary",content_only:!0,title:t.localize("ui.panel.lovelace.strategy.home-other-devices.all_organized_title"),content:t.localize("ui.panel.lovelace.strategy.home-other-devices.all_organized_content")}]}:(1===a.length&&(a[0].column_span=2),{type:"sections",header:{badges_position:"bottom"},max_columns:p,sections:a})}}_.registryDependencies=["entities","devices","areas","floors"],_=(0,i.Cg)([(0,a.EM)("home-other-devices-view-strategy")],_),n.d(t,{HomeOtherDevicesViewStrategy:()=>_})}};
//# sourceMappingURL=32399.0b914de7866d66e0.js.map