import { jsx } from "react/jsx-runtime";
import { render } from "@testing-library/react";
import { Provider } from "react-redux";
import { createMemoryHistory } from "history";
import { createAppStore } from "../../data/store.js";
import { browserHistory } from "../history.js";
import { AppRouter } from "../../view/app-router.js";
const renderWithRouterRedux = (ui, {
  route = "/",
  history = createMemoryHistory({ initialEntries: [route] }),
  initialState,
  store = createAppStore(initialState, browserHistory)
} = {}) => ({
  ...render(
    /* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AppRouter, { history, children: ui }) })
  ),
  // adding `store` to the returned utilities to allow us
  // to reference it in our tests (just try to avoid using
  // this to test implementation details).
  store
});
export {
  renderWithRouterRedux
};
