import { jsx as e } from "../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { useCallback as s } from "../../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import { sharedCapitalOverviewAnalyticsEventProperties as p, CAPITAL_OVERVIEW_CLASS_NAMES as o } from "../constants.js";
import { useLandedPageEvent as u } from "../../../../hooks/useAnalytics/useLandedPageEvent.js";
import c from "../../../internal/Button/Button.js";
import d from "../../../internal/Typography/Typography.js";
import { TypographyVariant as f } from "../../../internal/Typography/types.js";
import v from "../../../../core/Context/preact/useCoreContext.js";
import y from "../../../../core/Context/analytics/preact/useAnalyticsContext.js";
import h from "../../../internal/InfoBox/InfoBox.js";
import { Fragment as C } from "../../../../external/.pnpm/preact@10.28.2/node_modules/preact/dist/preact.module.js";
import { CapitalHeader as g } from "../../../internal/CapitalHeader/CapitalHeader.js";
const n = {
  ...p,
  subCategory: "Prequalified"
}, T = ({
  dynamicOfferConfig: r,
  hideTitle: l,
  onOfferOptionsRequest: a
}) => {
  const { i18n: t } = v(), i = y(), m = s(() => {
    try {
      return a();
    } finally {
      i.addEvent?.("Clicked button", { ...n, label: "See options" });
    }
  }, [a, i]);
  return u({ ...n, label: "Capital overview" }), /* @__PURE__ */ e(C, { children: [
    /* @__PURE__ */ e(g, { hideTitle: l, titleKey: "capital.overview.common.titles.qualificationIntro" }),
    /* @__PURE__ */ e("div", { className: o.preQualifiedGrant, children: [
      /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(d, { variant: f.BODY, children: [
        t.get("capital.overview.prequalified.alreadyQualifyInfo.part1"),
        /* @__PURE__ */ e("strong", { children: t.get("capital.overview.prequalified.alreadyQualifyInfo.part2", {
          values: {
            amount: t.amount(r.maxAmount.value, r.maxAmount.currency, {
              minimumFractionDigits: 0
            })
          }
        }) })
      ] }) }),
      /* @__PURE__ */ e(c, { className: o.preQualifiedGrantButton, onClick: m, children: t.get("capital.overview.prequalified.actions.seeOptions") })
    ] })
  ] });
};
export {
  T as default
};
