/**
 * MF expose wrapper for the Schedule feature.
 *
 * Lazy-loads the ScheduleStartPage via React.lazy + Suspense.
 * Full MF integration with host routing is deferred to a later phase;
 * for now this renders the start page for embedded usage.
 */

import { lazy, Suspense } from "react";
import type { HostContract } from "@/host-contract";

const ScheduleStartPage = lazy(() =>
  import("@/features/schedule/components/ScheduleStartPage.js").then(
    (m) => ({ default: m.ScheduleStartPage }),
  ),
);

export interface ScheduleRemoteProps {
  hostContract: HostContract;
}

export default function ScheduleRemote(_props: ScheduleRemoteProps): JSX.Element {
  return (
    <div data-mf-expose="Schedule">
      <Suspense fallback={<div aria-busy="true">Loading Schedule...</div>}>
        <ScheduleStartPage />
      </Suspense>
    </div>
  );
}
