import { aN as m, aK as t, s as i } from "./index-GTnBs7av.js";
import { A as h } from "./AppCard-Q28K7Yaw.js";
import { u as I } from "./useIsAppEnabled-7UywjsU4.js";
const R = function({ app: s, eventType: c }) {
  var n;
  const { getAppData: p, setAppData: r, disabled: a } = m(), d = p("SITE_ID"), o = p("SCRIPT_URL"), { enabled: l, updateEnabled: u } = I(s);
  return /* @__PURE__ */ t.jsx(
    h,
    {
      app: s,
      switchOnClick: (e) => {
        u(e);
      },
      switchChecked: l,
      teamId: ((n = c.team) == null ? void 0 : n.id) || void 0,
      children: /* @__PURE__ */ t.jsxs("fieldset", { className: "space-y-2", disabled: a, children: [
        /* @__PURE__ */ t.jsx(
          i,
          {
            disabled: a,
            name: "Script URL",
            value: o,
            defaultValue: "https://us.umami.is/script.js",
            placeholder: "Enter the script source URL",
            onChange: (e) => {
              r("SCRIPT_URL", e.target.value);
            }
          }
        ),
        /* @__PURE__ */ t.jsx(
          i,
          {
            disabled: a,
            name: "Site ID",
            value: d,
            placeholder: "Enter your Site ID",
            onChange: (e) => {
              r("SITE_ID", e.target.value);
            }
          }
        )
      ] })
    }
  );
};
export {
  R as default
};
