import { jsx as t, jsxs as e } from "react/jsx-runtime";
import { s as o, K as u } from "./index-T-3isYi5.js";
import { A as h } from "./AppCard-JgJMoBtw.js";
import { u as f } from "./useIsAppEnabled-SudDKIHz.js";
const I = function({
  eventType: a,
  app: s,
  onAppInstallSuccess: l
}) {
  var n;
  const { getAppData: p, setAppData: i } = o(), c = p("isSunrise"), { enabled: d, updateEnabled: r } = f(s);
  return /* @__PURE__ */ t(
    h,
    {
      onAppInstallSuccess: l,
      app: s,
      switchOnClick: (m) => {
        m ? (r(!0), i("isSunrise", !0)) : (r(!1), i("isSunrise", !1));
      },
      switchChecked: d,
      teamId: ((n = a.team) == null ? void 0 : n.id) || void 0,
      children: /* @__PURE__ */ e("div", { className: "mt-2 text-sm", children: [
        /* @__PURE__ */ e("div", { className: "flex", children: [
          /* @__PURE__ */ t("span", { className: "ltr:mr-2 rtl:ml-2", children: /* @__PURE__ */ t(u, { name: c ? "sunrise" : "sunset" }) }),
          "I am an AppCard for Event with Title: ",
          a.title
        ] }),
        " ",
        /* @__PURE__ */ e("div", { className: "mt-2", children: [
          "Edit ",
          /* @__PURE__ */ e("span", { className: "italic", children: [
            "packages/app-store/",
            s.slug,
            "/EventTypeAppCardInterface.tsx"
          ] }),
          " to play with me"
        ] })
      ] })
    }
  );
};
export {
  I as default
};
