import { jsx as a } from "react/jsx-runtime";
import { q as c } from "./index-C62tPk5p.js";
import { A as l } from "./AppCard-CQEg94Y3.js";
import { u } from "./useIsAppEnabled-DnQeiNdg.js";
import A from "./EventTypeAppSettingsInterface-BLFrLk44.js";
const v = function({ eventType: e, app: t, onAppInstallSuccess: r }) {
  var p;
  const { enabled: s, updateEnabled: o } = u(t), { disabled: n, getAppData: d, setAppData: i } = c();
  return /* @__PURE__ */ a(
    l,
    {
      onAppInstallSuccess: r,
      app: t,
      switchOnClick: (m) => {
        o(m);
      },
      switchChecked: s,
      teamId: ((p = e.team) == null ? void 0 : p.id) || void 0,
      children: /* @__PURE__ */ a(
        A,
        {
          eventType: e,
          slug: t.slug,
          disabled: n,
          getAppData: d,
          setAppData: i
        }
      )
    }
  );
};
export {
  v as default
};
