import { jsx as l } from "../../../../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { useWizardFormContext as d } from "../../../../../../../../hooks/form/wizard/WizardFormContext.js";
import { useCallback as n } from "../../../../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import { FormTextInput as N } from "../../../../../../../internal/FormWrappers/FormTextInput.js";
import { PAYMENT_LINK_CREATION_FIELD_LENGTHS as p } from "../../../../../constants.js";
import f from "../../../../../../../../core/Context/preact/useCoreContext.js";
const x = ({
  isSameAddress: e,
  isAddressFieldRequired: s,
  isSameAddressCopyEnabled: r = !1
}) => {
  const { i18n: i } = f(), { setValue: o, fieldsConfig: m } = d(), t = n(
    (u) => {
      r && e && o("billingAddress.houseNumberOrName", u.currentTarget.value);
    },
    [e, o, r]
  ), a = m["deliveryAddress.houseNumberOrName"]?.required || s("deliveryAddress.houseNumberOrName");
  return /* @__PURE__ */ l(
    N,
    {
      maxLength: p.deliveryAddress.houseNumberOrName.max,
      fieldName: "deliveryAddress.houseNumberOrName",
      label: i.get("payByLink.creation.fields.deliveryAddress.houseNumberOrName.label"),
      onInput: t,
      className: "adyen-pe-payment-link-creation-form__shipping-address-field--small",
      hideOptionalLabel: !0,
      isRequired: a
    }
  );
};
export {
  x as ShippingHouseNumberField
};
