const require_chunk = require('./chunk-BaqVhFee.cjs');
let signal_exit = require("signal-exit");
signal_exit = require_chunk.__toESM(signal_exit);
let ws = require("ws");
ws = require_chunk.__toESM(ws);

//#region src/devtools.ts
const customGlobal = globalThis;
customGlobal.WebSocket ||= ws.default;
customGlobal.window ||= customGlobal;
customGlobal.self ||= customGlobal;
customGlobal.isDevtoolsEnabled = true;
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
	{
		type: 2,
		value: "Context.Provider",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "KubbRoot",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "KubbErrorBoundary",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "kubb-file",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "kubb-text",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "kubb-import",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "kubb-export",
		isEnabled: true,
		isValid: true
	},
	{
		type: 2,
		value: "kubb-source",
		isEnabled: true,
		isValid: true
	}
];
function openDevtools() {
	let subprocess;
	import("execa").then(async (execa) => {
		console.log("Opening devtools");
		subprocess = execa.execa({ preferLocal: true })`npx react-devtools`;
	}).then(() => {
		return Promise.resolve().then(() => require_chunk.__toDynamicImportESM(1)(require("./backend-COBWf8qu.cjs")));
	}).then((devtools) => {
		console.log("Connecting devtools");
		devtools.default.connectToDevTools();
	}).catch(() => {
		console.log("Error connecting devtools");
	});
	(0, signal_exit.onExit)(() => {
		console.log("Disconnecting devtools");
		subprocess?.kill();
	}, { alwaysLast: false });
}
openDevtools();

//#endregion
//# sourceMappingURL=devtools.cjs.map