@adyen/adyen-platform-experience-web
Version:

22 lines (21 loc) • 872 B
JavaScript
import r from "../../../hooks/useTimezoneAwareDateFormatting.js";
import { useMemo as i } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import s from "../../../core/Context/preact/useCoreContext.js";
import { DATE_FORMAT_MISSING_ACTION as n } from "../../../constants/dateFormats.js";
const v = (a) => {
const { i18n: e } = s(), { dateFormat: o } = r(), t = i(
() => a ? o(a, n) : void 0,
[o, a]
);
return {
single: t ? e.get("capital.overview.grants.item.alerts.actionNeededBy", {
values: { date: t }
}) : e.get("capital.overview.grants.item.alerts.actionNeeded"),
multiple: t ? e.get("capital.overview.grants.item.alerts.actionNeededByMany", {
values: { date: t }
}) : e.get("capital.overview.grants.item.alerts.actionNeededMany")
};
};
export {
v as useActionsAlertTitles
};