try {
	let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
	n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f6605f39-78fd-4dc2-8b24-00ae76ca96aa", e._sentryDebugIdIdentifier = "sentry-dbid-f6605f39-78fd-4dc2-8b24-00ae76ca96aa");
} catch (e) {}
import { r as summaryItem } from "./summaryItem-Dehjwp8D.js";
import { t as isEmpty } from "./isEmpty-Cf1sv6Wg.js";
import { r as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-CbGZXKK3.js";
import { jsx, jsxs } from "preact/jsx-runtime";
//#region src/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.tsx
var mapJpAddressSummary = (data, datasetUtils) => {
	if (!data) return {};
	return {
		country: datasetUtils.getCountryName("JP") ?? "JP",
		postalCode: summaryItem("postalCode", data.postalCode),
		stateOrProvince: summaryItem("prefecture", /* @__PURE__ */ jsxs("div", { children: [
			/* @__PURE__ */ jsx("p", { children: data.jaHaniStateOrProvince }),
			/* @__PURE__ */ jsx("p", { children: data.jaKanaStateOrProvince }),
			/* @__PURE__ */ jsx("p", { children: data.stateOrProvince })
		] })),
		city: summaryItem("districtTownAreaCityWard", /* @__PURE__ */ jsxs("div", { children: [
			/* @__PURE__ */ jsx("p", { children: data.jaHaniCity }),
			/* @__PURE__ */ jsx("p", { children: data.jaKanaCity }),
			/* @__PURE__ */ jsx("p", { children: data.city })
		] })),
		otherAddressInformation: summaryItem("chomeAndBanchi", data.otherAddressInformation),
		address: summaryItem("buildingNameFloorRoomNumberEtc", /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: data.jaHaniAddress }), /* @__PURE__ */ jsx("p", { children: data.address })] }))
	};
};
var mapJpAddressSummaryNewSummary = (data, datasetUtils) => {
	if (!data) return {};
	return {
		country: datasetUtils.getCountryName("JP") ?? "JP",
		postalCode: data.postalCode,
		prefecture: /* @__PURE__ */ jsxs("div", { children: [
			/* @__PURE__ */ jsx("p", { children: data.jaHaniStateOrProvince }),
			/* @__PURE__ */ jsx("p", { children: data.jaKanaStateOrProvince }),
			/* @__PURE__ */ jsx("p", { children: data.stateOrProvince })
		] }),
		districtTownAreaCityWard: /* @__PURE__ */ jsxs("div", { children: [
			/* @__PURE__ */ jsx("p", { children: data.jaHaniCity }),
			/* @__PURE__ */ jsx("p", { children: data.jaKanaCity }),
			/* @__PURE__ */ jsx("p", { children: data.city })
		] }),
		chomeAndBanchi: data.otherAddressInformation,
		buildingNameFloorRoomNumberEtc: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: data.jaHaniAddress }), /* @__PURE__ */ jsx("p", { children: data.address })] })
	};
};
//#endregion
//#region src/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.ts
var mapJpAddressSchemaToAddressLocalizations = (data) => {
	if (!data) return [];
	return [mapSchemaFieldsToApiScriptLocalization(data, "jaHani"), mapSchemaFieldsToApiScriptLocalization(data, "jaKana")].filter(({ fields }) => !isEmpty(fields)).map(({ script, fields }) => ({
		script,
		fields: {
			city: fields.city,
			..."address" in fields ? { street: fields.address } : void 0
		}
	}));
};
//#endregion
export { mapJpAddressSummary as n, mapJpAddressSummaryNewSummary as r, mapJpAddressSchemaToAddressLocalizations as t };
