import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./styles.css";

if (!window.imageForge) {
  window.imageForge = {
    openFolder: async () => {},
    saveImage: async () => {
      window.alert("Save is only available in the desktop app.");
      return false;
    },
    showError: async (title: string, message: string) => {
      window.alert(`${title}: ${message}`);
    },
    pickImage: async () => null,
    readImageDataUrl: async () => null,
  };
}

ReactDOM.createRoot(document.getElementById("root")!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);
