import { jsx as e, jsxs as b } from "react/jsx-runtime";
import { r as g, q as S, s as k, W as A, p as r } from "./index-T-3isYi5.js";
import { A as f, S as n } from "./AppCard-JgJMoBtw.js";
import { u as E } from "./useIsAppEnabled-SudDKIHz.js";
const G = function({
  app: a,
  eventType: p,
  onAppInstallSuccess: u
}) {
  var c;
  const d = g.usePathname(), { t: s } = S(), { getAppData: o, setAppData: i } = k(), { enabled: l, updateEnabled: h } = E(a), m = o("ignoreGuests") ?? !1, C = o("skipContactCreation") ?? !1;
  return /* @__PURE__ */ e(
    f,
    {
      onAppInstallSuccess: u,
      returnTo: `${A}${d}?tabName=apps`,
      app: a,
      teamId: ((c = p.team) == null ? void 0 : c.id) || void 0,
      switchOnClick: (t) => {
        h(t);
      },
      switchChecked: l,
      hideSettingsIcon: !0,
      children: /* @__PURE__ */ b(n.Content, { children: [
        /* @__PURE__ */ e(n.SubSection, { children: /* @__PURE__ */ e(
          n.SubSectionHeader,
          {
            icon: "user-plus",
            title: s("hubspot_ignore_guests"),
            labelFor: "ignore-guests",
            children: /* @__PURE__ */ e(
              r,
              {
                size: "sm",
                labelOnLeading: !0,
                checked: m,
                onCheckedChange: (t) => {
                  i("ignoreGuests", t);
                }
              }
            )
          }
        ) }),
        /* @__PURE__ */ e(n.SubSection, { children: /* @__PURE__ */ e(
          n.SubSectionHeader,
          {
            icon: "user-plus",
            title: s("skip_contact_creation", { appName: "HubSpot" }),
            labelFor: "skip-contact-creation",
            children: /* @__PURE__ */ e(
              r,
              {
                size: "sm",
                labelOnLeading: !0,
                checked: C,
                onCheckedChange: (t) => {
                  i("skipContactCreation", t);
                }
              }
            )
          }
        ) })
      ] })
    }
  );
};
export {
  G as default
};
