69 lines
2.2 KiB
TypeScript
69 lines
2.2 KiB
TypeScript
// Metro module 11982 (f11983).
|
|
import { ClearAfterValues } from "../Constants";
|
|
import { isSameDay } from "../../../utils/DateUtils";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import Durations from "../../../utils/Durations";
|
|
import { assertNever } from "../../../utils/GlobalUtils";
|
|
export default function formatClearAfterOption(a0) {
|
|
if (ClearAfterValues.TODAY === a0) {
|
|
const r241 = intl.formatToPlainString(t.Rea2gR, {
|
|
hours: 24
|
|
});
|
|
const DAY = Durations.Millis.DAY;
|
|
const r251 = Date.now() + DAY;
|
|
return `${r241} (${isSameDay(new Date(), new Date(r251)) ? intl.data.formatTime(r251, {
|
|
format: "short"
|
|
}) : intl.formatToPlainString(t.DN91Jz, {
|
|
time: intl.data.formatTime(r251, {
|
|
format: "short"
|
|
})
|
|
})})`;
|
|
}
|
|
if (ClearAfterValues.HOURS_4 === a0) {
|
|
const r173 = intl.formatToPlainString(t.Rea2gR, {
|
|
hours: 4
|
|
});
|
|
const r180 = 4 * Durations.Millis.HOUR;
|
|
const r185 = Date.now() + r180;
|
|
return `${r173} (${isSameDay(new Date(), new Date(r185)) ? intl.data.formatTime(r185, {
|
|
format: "short"
|
|
}) : intl.formatToPlainString(t.DN91Jz, {
|
|
time: intl.data.formatTime(r185, {
|
|
format: "short"
|
|
})
|
|
})})`;
|
|
}
|
|
if (ClearAfterValues.HOURS_1 === a0) {
|
|
const r107 = intl.formatToPlainString(t.Rea2gR, {
|
|
hours: 1
|
|
});
|
|
const HOUR = Durations.Millis.HOUR;
|
|
const r117 = Date.now() + HOUR;
|
|
return `${r107} (${isSameDay(new Date(), new Date(r117)) ? intl.data.formatTime(r117, {
|
|
format: "short"
|
|
}) : intl.formatToPlainString(t.DN91Jz, {
|
|
time: intl.data.formatTime(r117, {
|
|
format: "short"
|
|
})
|
|
})})`;
|
|
}
|
|
if (ClearAfterValues.MINUTES_30 === a0) {
|
|
const r8 = intl.formatToPlainString(t.TS3eJb, {
|
|
minutes: 30
|
|
});
|
|
const r55 = 30 * Durations.Millis.MINUTE;
|
|
const r9 = Date.now() + r55;
|
|
return `${r8} (${isSameDay(new Date(), new Date(r9)) ? intl.data.formatTime(r9, {
|
|
format: "short"
|
|
}) : intl.formatToPlainString(t.DN91Jz, {
|
|
time: intl.data.formatTime(r9, {
|
|
format: "short"
|
|
})
|
|
})})`;
|
|
}
|
|
if (ClearAfterValues.DONT_CLEAR === a0) {
|
|
return intl.string(t.bRn8cq);
|
|
}
|
|
assertNever(a0);
|
|
};
|