import { jsx as t, jsxs as h } from "react/jsx-runtime";
import { J as m, k as p } from "./index-ykl8OQ78.js";
import { A } from "./AppCard-cTyZ7qdO.js";
import { u as I } from "./useIsAppEnabled-jQTpW-EN.js";
const x = function({ app: a, eventType: s }) {
  var i;
  const { getAppData: r, setAppData: n, disabled: o } = m(), d = r("TRACKING_ID"), l = r("API_HOST"), { enabled: c, updateEnabled: u } = I(a);
  return /* @__PURE__ */ t(
    A,
    {
      hideSettingsIcon: !0,
      app: a,
      switchOnClick: (e) => {
        u(e);
      },
      switchChecked: c,
      teamId: ((i = s.team) == null ? void 0 : i.id) || void 0,
      children: /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
        /* @__PURE__ */ t(
          p,
          {
            required: !0,
            disabled: o,
            name: "Tracking ID",
            value: d,
            placeholder: "Enter your Tracking ID",
            onChange: (e) => {
              n("TRACKING_ID", e.target.value);
            }
          }
        ),
        /* @__PURE__ */ t(
          p,
          {
            required: !0,
            disabled: o,
            name: "Api host",
            value: l,
            placeholder: "Enter your Api host url",
            onChange: (e) => {
              n("API_HOST", e.target.value);
            }
          }
        )
      ] })
    }
  );
};
export {
  x as default
};
