import { jsx as a } from "react/jsx-runtime";
import { s as c } from "./index-T-3isYi5.js";
import { A as l } from "./AppCard-JgJMoBtw.js";
import { u } from "./useIsAppEnabled-SudDKIHz.js";
import A from "./EventTypeAppSettingsInterface-_hPlJi6w.js";
const v = function({ eventType: e, app: t, onAppInstallSuccess: s }) {
  var p;
  const { enabled: r, updateEnabled: o } = u(t), { disabled: n, getAppData: d, setAppData: i } = c();
  return /* @__PURE__ */ a(
    l,
    {
      onAppInstallSuccess: s,
      app: t,
      switchOnClick: (m) => {
        o(m);
      },
      switchChecked: r,
      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
};
