import { useUiTranslation as e } from "../../../i18n/useUiTranslation.js";
import { useMemo as t } from "react";
import { jsx as n } from "react/jsx-runtime";
//#region src/atomic/atoms/formatted-date/FormattedDate.tsx
var r = {
	year: "numeric",
	month: "short",
	day: "numeric"
}, i = ({ value: i, fallback: a, options: o = r, locale: s, className: c }) => {
	let { t: l } = e(), u = a ?? l("common.notAvailable");
	return /* @__PURE__ */ n("span", {
		className: c,
		children: t(() => {
			if (i == null) return u;
			let e = new Date(String(i));
			if (Number.isNaN(e.getTime())) return u;
			try {
				return new Intl.DateTimeFormat(s, o).format(e);
			} catch {
				return u;
			}
		}, [
			i,
			u,
			s,
			o
		])
	});
};
//#endregion
export { i as FormattedDate };

//# sourceMappingURL=FormattedDate.js.map