export const __rspack_esm_id="5222";export const __rspack_esm_ids=["5222"];export const __webpack_modules__={76517(e,o,s){s.d(o,{attachExternalToApp:()=>r,v:()=>c});s(18111),s(7588),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var a=s(1087),t=s(63091),d=s(91926),i=s(88249);const n=new Set,r=e=>{window.addEventListener("haptic",o=>e.hass.auth.external.fireMessage({type:"haptic",payload:{hapticType:o.detail}})),e.hass.auth.external.addCommandHandler(o=>l(e,o))},c=e=>(n.add(e),()=>{n.delete(e)}),l=(e,o)=>{const s=e.hass.auth.external;if("restart"===o.command)e.hass.connection.reconnect(!0);else if("navigate"===o.command)(0,d.o)(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(t.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(t.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,i.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("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}}};
//# sourceMappingURL=5222.8534f10e788d501b.js.map