export const __rspack_esm_id=8241;export const __rspack_esm_ids=[8241];export const __webpack_modules__={54408(e,o,s){s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var a=s(148),i=s(27802),t=s(56245),d=s(46602);const n=new Set,r=(e,o)=>{const s=e.hass.auth.external;if("restart"===o.command)e.hass.connection.reconnect(!0);else if("navigate"===o.command)(0,t.oo)(o.payload.path,o.payload.options);else if("notifications/show"===o.command)(0,a.r)(e,"hass-show-notifications");else if("sidebar/toggle"===o.command){if(i.G.history.state?.open)return s.fireMessage({id:o.id,type:"result",success:!1,error:{code:"not_allowed",message:"dialog open"}}),!0;(0,a.r)(e,"hass-toggle-menu")}else if("sidebar/show"===o.command){if(i.G.history.state?.open)return s.fireMessage({id:o.id,type:"result",success:!1,error:{code:"not_allowed",message:"dialog open"}}),!0;(0,a.r)(e,"hass-toggle-menu",{open:!0})}else if("automation/editor/show"===o.command)(0,d.mX)(o.payload?.config);else if("improv/discovered_device"===o.command)(0,a.r)(window,"improv-discovered-device",o.payload);else if("improv/device_setup_done"===o.command)(0,a.r)(window,"improv-device-setup-done");else if("matter/commission/finish"===o.command)(0,a.r)(window,"matter-commission-finish",o.payload);else if("bar_code/scan_result"===o.command)n.forEach(e=>e(o));else if("bar_code/aborted"===o.command)n.forEach(e=>e(o));else{if("kiosk_mode/set"!==o.command)return!1;(0,a.r)(window,"hass-kiosk-mode",{enable:o.payload.enable})}return s.fireMessage({id:o.id,type:"result",success:!0,result:null}),!0};s.d(o,{},{attachExternalToApp:e=>{window.addEventListener("haptic",o=>e.hass.auth.external.fireMessage({type:"haptic",payload:{hapticType:o.detail}})),e.hass.auth.external.addCommandHandler(o=>r(e,o))},v:e=>(n.add(e),()=>{n.delete(e)})})}};
//# sourceMappingURL=8241.35c764e3603f1072.js.map