import { v as m, q as a, f as r } from "./index-jYYVpIDL.js";
import { A as h } from "./AppCard-pSUVQRE0.js";
import { u as x } from "./useIsAppEnabled-Tvqt7uu5.js";
const E = function({ app: t, eventType: i }) {
  var d;
  const { getAppData: s, setAppData: o, disabled: n } = m(), l = s("MATOMO_URL"), p = s("SITE_ID"), { enabled: c, updateEnabled: u } = x(t);
  return /* @__PURE__ */ a.jsx(
    h,
    {
      hideSettingsIcon: !0,
      app: t,
      switchOnClick: (e) => {
        u(e);
      },
      switchChecked: c,
      teamId: ((d = i.team) == null ? void 0 : d.id) || void 0,
      children: /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-2", children: [
        /* @__PURE__ */ a.jsx(
          r,
          {
            dataTestid: `${t.slug}-url`,
            name: "Matomo URL",
            placeholder: "Enter your Matomo URL here",
            value: l,
            disabled: n,
            onChange: (e) => {
              o("MATOMO_URL", e.target.value);
            }
          }
        ),
        /* @__PURE__ */ a.jsx(
          r,
          {
            dataTestid: `${t.slug}-site-id`,
            disabled: n,
            name: "Site ID",
            placeholder: "Enter your Site ID",
            value: p,
            onChange: (e) => {
              o("SITE_ID", e.target.value);
            }
          }
        )
      ] })
    }
  );
};
export {
  E as default
};
