import { jsxs, Fragment, jsx } from "react/jsx-runtime";
import { Head, createInertiaApp } from "@inertiajs/react";
import { Component } from "react";
import createServer from "@inertiajs/react/server";
import ReactDOMServer from "react-dom/server";
class Index extends Component {
  constructor(props) {
    super(props);
    this.name = "你好";
  }
  // componentWillUnmount() {
  //     console.log('我先执行')
  // }
  componentDidMount() {
    console.log("我先执行2");
  }
  shouldComponentUpdate(next, old) {
    return true;
  }
  render() {
    return /* @__PURE__ */ jsxs(Fragment, { children: [
      /* @__PURE__ */ jsx(Head, { title: this.props.info.title }),
      /* @__PURE__ */ jsx("h1", { children: "Home" }),
      /* @__PURE__ */ jsx("div", { children: this.name })
    ] });
  }
}
const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Index
}, Symbol.toStringTag, { value: "Module" }));
createServer(
  (page) => createInertiaApp({
    page,
    render: ReactDOMServer.renderToString,
    resolve: (name) => {
      const pages = /* @__PURE__ */ Object.assign({ "./Pages/Home/index.tsx": __vite_glob_0_0 });
      return pages[`./Pages/${name}.tsx`];
    },
    setup: ({ App, props }) => /* @__PURE__ */ jsx(App, { ...props })
  }),
  9e3
);
