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