import * as React from "react";
import { createRoot } from "react-dom/client";
import App from "./components/App";
import { FluentProvider, webLightTheme } from "@fluentui/react-components";
/* global document, Office, module, require, HTMLElement */
const title = "Edison for PowerPoint";
const rootElement: HTMLElement | null = document.getElementById("container");
const root = rootElement ? createRoot(rootElement) : undefined;
/* Render application after Office initializes */
Office.onReady(() => {
root?.render(
);
});
// Define proper module hot interface for webpack hot module replacement
interface HotModule extends NodeModule {
hot?: {
accept(path: string, callback: () => void): void;
};
}
// Use the proper type for module with HMR
if ((module as HotModule).hot) {
(module as HotModule).hot?.accept("./components/App", () => {
const NextApp = require("./components/App").default;
root?.render(
);
});
}