Files
discord-decomp/sources/modules/guild_settings/native/EmojiOverflowActionSheet.tsx
T
2026-07-27 16:20:00 +03:00

613 lines
24 KiB
TypeScript

/* Metro module 15908; source: modules/guild_settings/native/EmojiOverflowActionSheet.tsx; dependencies: [5, 31, 27, 33, 4501, 6805, 1423, 4573, 6231, 6238, 4071, 1244, 8629, 9646, 4131, 3856, 5312, 2] */
function _fun122746(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16116:6, offset: 0x02573047, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.Image;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'paddingHorizontal': 8,
'flexDirection': 'row', 'alignItems': 'center', 'gap': 16}, emojiImage: {'width': 30, 'height': 30,
'resizeMode': 'contain'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/EmojiOverflowActionSheet.tsx');
exports.default = EmojiOverflowActionSheet;
}
function EmojiOverflowActionSheet({emoji, guildId, onSelectRolesForEmoji, onEdit, onClose}) { // fn#122747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16116:430, offset: 0x0257314a, size: 1005 bytes, params: 2, frame: 35
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
var r10;
const styles = useStyles();
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const avatarUtilsModule = importAll(1423) /* metro dependency 1423: AvatarUtils */;
const getEmojiURL = avatarUtilsModule.getEmojiURL;
const image = <Image style={styles.emojiImage} source={{uri: Reflect.apply(getEmojiURL, avatarUtilsModule,
[{id: emoji.id, animated: emoji.animated, size: 48}])}} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.header}>{image}<Text variant="text-md/semibold" color="mobile-text-heading-primary">{':' + emoji.name + ':'}</Text></View>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
object.icon = <TrashIcon color="text-feedback-critical" />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = <Text variant="text-md/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oyYWHE)}</Text>;
object.onPress = onPress_122748;
const items3 = [<TableRow {...object} />];
items3[1] = <TableRow icon={<PencilIcon />} label={<Text variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)}</Text>} onPress={function() {
onEdit();
onClose();
}} />;
if (onSelectRolesForEmoji != null) {
r10 = <TableRow icon={<PencilIcon />} label={<Text variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+riKdA'])}</Text>} onPress={onEdit(_fun122751)} />;
} else {
r10 = null;
}
items3[2] = r10;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
items3[3] = <TableRow icon={<XSmallIcon />} label={<Text variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text>} onPress={onClose} />;
return (
<ActionSheet>
{view}
<TableRowGroup hasIcons>
{items3}
</TableRowGroup>
</ActionSheet>
);
}
function EmojiOverflowActionSheetOnPress() { // fn#122748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16116:1079, owner: EmojiOverflowActionSheet.onPress, offset: 0x02573537, size: 63 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(8629) /* metro dependency 8629: EmojiActionCreators */;
value.deleteEmoji(guildId, emoji.id);
onClose();
}
function* _fun122751() { // fn#122751, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16116:1468, offset: 0x02573598, size: 295 bytes, params: 1, frame: 18
var r2;
var value3;
var value4;
var value5;
var binding;
var binding2;
var property;
var value7;
var updateEmoji;
var object2;
var id;
var value8;
var value9;
var value10;
var error;
var value11;
var APIError;
var value12;
var presentError;
var anyErrorMessage;
var binding3;
var intl;
var string;
var t;
var R0RpRX;
var value14;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
value3 = dependencyMap(require);
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
if (value5) {
return value4;
}
try {
binding = env2_0;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
property = binding2[12];
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
updateEmoji = value7.updateEmoji;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
object2 = {};
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
object2.guildId = importAll;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
id = require.id;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
object2.emojiId = id;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
object2.roles = value4;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
try {
value8 = Reflect.apply(updateEmoji, value7, [object2]);
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
value11 = environment.__proto__.__proto__;
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
if (error instanceof APIError) {
binding = env2_0;
value12 = binding(env2_2[15]);
presentError = value12.presentError;
anyErrorMessage = error.getAnyErrorMessage();
if (anyErrorMessage != null) {
r2 = anyErrorMessage;
} else {
binding = env2_0;
binding3 = env2_2;
intl = binding(binding3[11]).intl;
string = intl.string;
t = binding(binding3[11]).t;
R0RpRX = t.R0RpRX;
value14 = Reflect.apply(string, intl, [R0RpRX]);
r2 = value14;
}
Reflect.apply(presentError, value12, [r2]);
}
Image();
return undefined;
}
if (value10) {
return value9;
}
Image();
}
}