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