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