118 lines
6.8 KiB
TypeScript
118 lines
6.8 KiB
TypeScript
/* Metro module 14821; source: modules/icymi/native/ItemDetailsActionSheet.tsx; dependencies: [31, 27, 1379, 1867, 9569, 33, 4501, 697, 566, 4805, 5115, 6819, 1305, 9579, 6805, 11251, 14822, 6231, 6238, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UseChannelName from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
|
|
import UseDesignToggle from '../../devtools/design_toggles/useDesignToggle.tsx'; /* Metro dependency 5115 */
|
|
import ICYMIStore from '../ICYMIStore.tsx'; /* Metro dependency 9569 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
|
|
import * as ActionSheetIconHeaderNativeModule from '../../../design/components/Sheet/native/ActionSheetIconHeader.native.tsx'; /* Metro dependency 11251 */
|
|
|
|
function _fun111870(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:6, offset: 0x023b5af9, size: 292 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.Fragment;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
|
|
const env0_10 = Reflect.apply(createStyles, value, [{divider: {height: 1, backgroundColor: BORDER_SUBTLE}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/icymi/native/ItemDetailsActionSheet.tsx');
|
|
exports.default = ItemDetailsActionSheet;
|
|
function ItemDetailsActionSheet({guildId, channelId, id}) { // fn#111871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:371, offset: 0x023b5c1d, size: 883 bytes, params: 2, frame: 28
|
|
var jsxRuntimeEnv0_8Binding;
|
|
var TableRowGroup;
|
|
var TableRow;
|
|
var score;
|
|
var JSON;
|
|
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
|
return ChannelStore.getChannel(channelId);
|
|
});
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuild(guildId);
|
|
});
|
|
const value3 = (UseChannelName)(channel, true);
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], _fun111874);
|
|
const value5 = (UseDesignToggle)('show_icymi_debug_scores');
|
|
const r13 = (
|
|
guild != null
|
|
? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
|
|
: (
|
|
channel != null
|
|
? ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar)
|
|
: undefined
|
|
)
|
|
);
|
|
const styles = useStyles();
|
|
let r14 = channel != null && guild != null && (require(9579) /* metro dependency 9579: ICYMIUtils */).isChannelCustomScoreEligible(channel);
|
|
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
|
|
object = {'showGradient': true, 'startExpanded': true};
|
|
const ActionSheetIconHeader = (ActionSheetIconHeaderNativeModule).ActionSheetIconHeader;
|
|
object.header = (
|
|
<ActionSheetIconHeader
|
|
icon={r13}
|
|
title={value3}
|
|
subtitle={guild?.name ?? ''}
|
|
/>
|
|
);
|
|
const items2 = [
|
|
r14 && ((ChannelScoreSettings) => <ChannelScoreSettings channel={channel} guild={guild} />)((require(14822) /* metro dependency 14822: ICYMIContentSettingControl */).ChannelScoreSettings),
|
|
|
|
];
|
|
let r5 = value4 != null && guild != null;
|
|
if (r5) {
|
|
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
|
r14 = r14 && <View style={styles.divider} />;
|
|
r5 = (
|
|
<>
|
|
{r14}
|
|
{((GuildScoreSettings) => <GuildScoreSettings guild={guild} />)((require(14822) /* metro dependency 14822: ICYMIContentSettingControl */).GuildScoreSettings)}
|
|
</>
|
|
);
|
|
}
|
|
items2[1] = r5;
|
|
if (value4 != null) {
|
|
if (value5) {
|
|
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
|
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
score = value4.score;
|
|
JSON = global.JSON;
|
|
r5 = (
|
|
<TableRowGroup title="Debug details" hasIcons={false}>
|
|
<TableRow label={'Total Score: ' + score} subLabel={JSON.stringify(value4.score_components)} />
|
|
</TableRowGroup>
|
|
);
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
items2[2] = r5;
|
|
return (
|
|
<ActionSheet {...object}>
|
|
{items2}
|
|
</ActionSheet>
|
|
);
|
|
function _fun111874() { // fn#111874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15018:601, offset: 0x023b5f90, size: 42 bytes, params: 1, frame: 12
|
|
const idBinding = id;
|
|
const value2 = null;
|
|
return value2 != idBinding ? ICYMIStore.getDehydratedItem(id) : value2;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun111870, 14821, [31, 27, 1379, 1867, 9569, 33, 4501, 697, 566, 4805, 5115, 6819, 1305, 9579, 6805,
|
|
11251, 14822, 6231, 6238,
|
|
2]) /* metro module 14821, dependencies: [31, 27, 1379, 1867, 9569, 33, 4501, 697, 566, 4805, 5115, 6819, 1305, 9579, 6805, 11251, 14822, 6231, 6238, 2] */;
|