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