import { jsx as t } from "react/jsx-runtime";
import { q as m, d as u } from "./index-C62tPk5p.js";
import { A as h } from "./AppCard-CQEg94Y3.js";
import { u as I } from "./useIsAppEnabled-DnQeiNdg.js";
const v = function({ app: a, eventType: p, onAppInstallSuccess: n }) {
  var d;
  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: ((d = p.team) == null ? void 0 : d.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
};
