import { jsx as p } from "react/jsx-runtime";
import { s as m, f as u } from "./index-T-3isYi5.js";
import { A as I } from "./AppCard-JgJMoBtw.js";
import { u as h } from "./useIsAppEnabled-SudDKIHz.js";
const v = function({ app: t, eventType: n, onAppInstallSuccess: o }) {
  var a;
  const { getAppData: r, setAppData: s, disabled: d } = m(), i = r("SITE_ID"), { enabled: c, updateEnabled: l } = h(t);
  return /* @__PURE__ */ p(
    I,
    {
      onAppInstallSuccess: o,
      app: t,
      switchOnClick: (e) => {
        l(e);
      },
      switchChecked: c,
      teamId: ((a = n.team) == null ? void 0 : a.id) || void 0,
      children: /* @__PURE__ */ p(
        u,
        {
          disabled: d,
          name: "Site ID",
          value: i,
          placeholder: "Enter your Site ID",
          onChange: (e) => {
            s("SITE_ID", e.target.value);
          }
        }
      )
    }
  );
};
export {
  v as default
};
