import dynamic from "next/dynamic";

import { DynamicComponent } from "../../_components/DynamicComponent";

export const AppSetupMap = {
  alby: dynamic(() => import("../../alby/pages/setup")),
  "apple-calendar": dynamic(() => import("../../applecalendar/pages/setup")),
  exchange: dynamic(() => import("../../exchangecalendar/pages/setup")),
  "exchange2013-calendar": dynamic(() => import("../../exchange2013calendar/pages/setup")),
  "exchange2016-calendar": dynamic(() => import("../../exchange2016calendar/pages/setup")),
  "caldav-calendar": dynamic(() => import("../../caldavcalendar/pages/setup")),
  "ics-feed": dynamic(() => import("../../ics-feedcalendar/pages/setup")),
  zapier: dynamic(() => import("../../zapier/pages/setup")),
  make: dynamic(() => import("../../make/pages/setup")),
  sendgrid: dynamic(() => import("../../sendgrid/pages/setup")),
  stripe: dynamic(() => import("../../stripepayment/pages/setup")),
  paypal: dynamic(() => import("../../paypal/pages/setup")),
  hitpay: dynamic(() => import("../../hitpay/pages/setup")),
  btcpayserver: dynamic(() => import("../../btcpayserver/pages/setup")),
};

export const AppSetupPage = (props: { slug: string }) => {
  return <DynamicComponent<typeof AppSetupMap> componentMap={AppSetupMap} {...props} />;
};

export default AppSetupPage;
