"use client";
'use strict';

const jsxRuntime = require('react/jsx-runtime');
const React = require('react');
const context = require('@btst/stack/context');
const components = require('@btst/stack/client/components');
const defaultError = require('../shared/default-error.cjs');
const _404Page = require('./404-page.cjs');
const dashboardSkeleton = require('../loading/dashboard-skeleton.cjs');

const DashboardPageInternal = React.lazy(
  () => import('./dashboard-page.internal.cjs').then((m) => ({
    default: m.DashboardPage
  }))
);
function DashboardPageComponent() {
  const { onRouteError } = context.usePluginOverrides("cms");
  return /* @__PURE__ */ jsxRuntime.jsx(
    components.ComposedRoute,
    {
      path: "/cms",
      PageComponent: DashboardPageInternal,
      ErrorComponent: defaultError.DefaultError,
      LoadingComponent: dashboardSkeleton.DashboardSkeleton,
      NotFoundComponent: _404Page.NotFoundPage,
      onError: (error) => {
        if (onRouteError) {
          onRouteError("dashboard", error, {
            path: "/cms",
            isSSR: typeof window === "undefined"
          });
        }
      }
    }
  );
}

exports.DashboardPageComponent = DashboardPageComponent;
