import { jsx as n } from "../../../../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import a from "../../../../../../../internal/Typography/Typography.js";
import { TypographyVariant as e, TypographyElement as m } from "../../../../../../../internal/Typography/types.js";
import { BillingStreetField as _ } from "./BillingStreetField.js";
import { BillingHouseNumberField as N } from "./BillingHouseNumberField.js";
import { BillingCountryField as k } from "./BillingCountryField.js";
import { BillingCityField as v } from "./BillingCityField.js";
import { BillingPostalCodeField as B } from "./BillingPostalCodeField.js";
import h from "../../../../../../../../core/Context/preact/useCoreContext.js";
const H = ({
  isSameAddress: t,
  isAddressFieldRequired: l,
  isOptional: p = !1,
  showBillingFirst: o = !1,
  isSameAddressCopyEnabled: i = !1,
  countriesData: c,
  isFetchingCountries: f,
  countryDatasetData: y,
  isFetchingCountryDataset: g
}) => {
  const { i18n: r } = h();
  return /* @__PURE__ */ n("div", { className: "adyen-pe-payment-link-creation-form__billing-address-container", children: [
    /* @__PURE__ */ n("div", { className: "adyen-pe-payment-link-creation-form__billing-address-title-container", children: [
      /* @__PURE__ */ n(
        a,
        {
          el: m.SPAN,
          variant: e.SUBTITLE,
          stronger: !0,
          className: "adyen-pe-payment-link-creation-form__billing-address-title",
          children: r.get("payByLink.creation.sections.billingAddress.label")
        }
      ),
      p && /* @__PURE__ */ n(
        a,
        {
          el: m.SPAN,
          variant: e.BODY,
          className: "adyen-pe-payment-link-creation-form__field-label-optional",
          children: `(${r.get("payByLink.common.fields.optional.label")})`
        }
      )
    ] }),
    /* @__PURE__ */ n("div", { children: [
      /* @__PURE__ */ n(
        _,
        {
          isSameAddress: t,
          isAddressFieldRequired: l,
          showBillingFirst: o,
          isSameAddressCopyEnabled: i
        }
      ),
      /* @__PURE__ */ n(
        N,
        {
          isSameAddress: t,
          isAddressFieldRequired: l,
          showBillingFirst: o,
          isSameAddressCopyEnabled: i
        }
      )
    ] }),
    /* @__PURE__ */ n("div", { children: [
      /* @__PURE__ */ n(
        k,
        {
          countriesData: c,
          isAddressFieldRequired: l,
          isFetchingCountries: f,
          countryDatasetData: y,
          isFetchingCountryDataset: g,
          isSameAddress: t,
          showBillingFirst: o,
          isSameAddressCopyEnabled: i
        }
      ),
      /* @__PURE__ */ n(
        v,
        {
          isSameAddress: t,
          isAddressFieldRequired: l,
          showBillingFirst: o,
          isSameAddressCopyEnabled: i
        }
      ),
      /* @__PURE__ */ n(
        B,
        {
          isSameAddress: t,
          isAddressFieldRequired: l,
          showBillingFirst: o,
          isSameAddressCopyEnabled: i
        }
      )
    ] })
  ] });
};
export {
  H as BillingAddressSection
};
