import { jsx as t, Fragment as u } from "react/jsx-runtime";
import { y as A, z as y, G as g, J as b, W as f } from "./index-MLgFWWYi.js";
import { useState as P } from "react";
import { A as v } from "./AppCard-Zx_xfVt_.js";
import C from "./EventTypeAppSettingsInterface-v7Pzk2Bm.js";
const x = function({
  eventType: o,
  app: e,
  eventTypeFormMetadata: p
}) {
  const { t: i } = A(), r = y.usePathname(), { getAppData: a, setAppData: c, disabled: m } = g(), [n, d] = P(a("enabled")), l = b(p), s = !n && l;
  return /* @__PURE__ */ t(
    v,
    {
      returnTo: `${f}${r}?tabName=apps`,
      app: e,
      switchChecked: n,
      switchOnClick: (h) => {
        d(h);
      },
      description: /* @__PURE__ */ t(u, { children: "Add lightning payments to your events and booking" }),
      disableSwitch: s,
      switchTooltip: s ? i("other_payment_app_enabled") : void 0,
      children: /* @__PURE__ */ t(
        C,
        {
          eventType: o,
          slug: e.slug,
          disabled: m,
          getAppData: a,
          setAppData: c
        }
      )
    }
  );
};
export {
  x as default
};
