import { jsx as e } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import a from "../Typography/Typography.js";
import { TypographyVariant as n, TypographyElement as r } from "../Typography/types.js";
import c from "classnames";
import s from "../../../core/Context/preact/useCoreContext.js";
const k = ({
  label: l,
  optional: o,
  supportText: i,
  children: t,
  className: m,
  testId: p
}) => {
  const { i18n: d } = s();
  return /* @__PURE__ */ e("div", { className: c("adyen-pe-payment-link-creation-form__field-container", m), "data-testid": p, children: [
    /* @__PURE__ */ e("div", { className: "adyen-pe-payment-link-creation-form__field-label-container", children: [
      /* @__PURE__ */ e(
        a,
        {
          el: r.SPAN,
          variant: n.BODY,
          stronger: !0,
          className: "adyen-pe-payment-link-creation-form__field-label",
          children: l
        }
      ),
      o && /* @__PURE__ */ e(
        a,
        {
          el: r.SPAN,
          variant: n.BODY,
          className: "adyen-pe-payment-link-creation-form__field-label-optional",
          children: `(${d.get("payByLink.common.fields.optional.label")})`
        }
      )
    ] }),
    t,
    i && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
      a,
      {
        el: r.SPAN,
        variant: n.BODY,
        className: "adyen-pe-payment-link-creation-form__field-support-text",
        children: i
      }
    ) })
  ] });
};
export {
  k as default
};
