Files
discord-decomp/modules/activities/confirmActivityChangeAlert.tsx
T
2026-11-01 12:12:55 +02:00

32 lines
1.1 KiB
TypeScript

// Metro module 10649 (f10650).
import RelationshipStore from "../../stores/RelationshipStore";
import UserStore from "../../stores/UserStore";
import { computeChannelName } from "../channel/useChannelName";
import AlertActionCreators from "../../actions/AlertActionCreators";
import { intl, t } from "../../intl/index.native";
import { isNullOrEmpty } from "../../utils/StringUtils";
export default function confirmActivityChangeModal(a0, a1, a2, a3) {
let currentApplicationChannelName = a1 != null ? computeChannelName(a1, UserStore, RelationshipStore) : "";
const r34 = {
title: intl.string(t.XkIWkk),
cancelText: intl.string(t["ETE/oC"]),
confirmText: intl.string(t["cY+Oob"]),
onConfirm: a2,
onCancel: a3,
body: null
};
const r60 = t["5/Xort"];
let currentApplicationName = a0?.name;
if (currentApplicationName == null) {
currentApplicationName = intl.string(t.G99XFs);
}
if (isNullOrEmpty(currentApplicationChannelName)) {
currentApplicationChannelName = intl.string(t.OGUjmt);
}
r34.body = intl.format(r60, {
currentApplicationName,
currentApplicationChannelName
});
AlertActionCreators.show(r34);
};