117 lines
6.6 KiB
TypeScript
117 lines
6.6 KiB
TypeScript
/* Metro module 6786; source: modules/guild_onboarding/native/ProviderConnectionCard.tsx; dependencies: [5, 31, 661, 33, 4048, 4915, 1244, 6787, 683, 4863, 1423, 4002, 1305, 4056, 6785, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
|
|
import ConnectionCardView from './ConnectionCardView.tsx'; /* Metro dependency 6785 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as LinkIconModule from '../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
|
|
import * as UseStartProviderConnectionModule from '../../application_account_linking/native/useStartProviderConnection.tsx'; /* Metro dependency 6787 */
|
|
|
|
function _fun53431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:6, offset: 0x01348e3d, size: 178 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_onboarding/native/ProviderConnectionCard.tsx');
|
|
exports.default = ProviderConnectionCard;
|
|
function ProviderConnectionCard({connection, guildId, location}) { // fn#53432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:258, offset: 0x01348eef, size: 422 bytes, params: 2, frame: 26
|
|
var r10;
|
|
var defaultImport;
|
|
var intl;
|
|
const value3 = (UseTheme)();
|
|
const env0_3 = value3;
|
|
if (connection.provider_id != null) {
|
|
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
r10 = defaultImport.get(connection.provider_id)?.name;
|
|
} else {
|
|
r10 = null;
|
|
}
|
|
if (r10 == null) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NzCoRx);
|
|
}
|
|
const value7 = (UseStartProviderConnectionModule).useStartProviderConnection(connection.provider_id);
|
|
const hasConnection = value7.hasConnection;
|
|
const canConnect = value7.canConnect;
|
|
const startConnection = value7.startConnection;
|
|
const startConnection2 = startConnection;
|
|
const loading = value7.loading;
|
|
const binding = startConnection2;
|
|
const useCallback = binding.useCallback;
|
|
return ((Component) => <Component displayName={r10} description={connection.description} icon={binding.useMemo(_fun53435,
|
|
[connection.provider_id,
|
|
value3])} isLoading={loading} isConnected={hasConnection} canConnect={canConnect} onConnect={Reflect.apply(useCallback,
|
|
binding, [env0_3(_fun53434), [startConnection, guildId, connection.provider_id,
|
|
location]])} />)(ConnectionCardView);
|
|
function* _fun53434() { // fn#53434, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:611, offset: 0x0134909e, size: 192 bytes, params: 1, frame: 19
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const binding = env2_1;
|
|
const binding2 = env2_2;
|
|
const value3 = undefined;
|
|
const value4 = binding(binding2[8]);
|
|
const track = value4.track;
|
|
const GUILD_ONBOARDING_CONNECTION_CLICKED = env2_5.GUILD_ONBOARDING_CONNECTION_CLICKED;
|
|
const object = {};
|
|
value = env2_0(binding2[9]);
|
|
copyDataProperties(object, value.collectGuildAnalyticsMetadata(importDefault), value);
|
|
object['connection_type'] = 'provider';
|
|
object['provider_id'] = require.provider_id ?? value3;
|
|
object['location'] = dependencyMap;
|
|
Reflect.apply(track, value4, [GUILD_ONBOARDING_CONNECTION_CLICKED, object]);
|
|
yield env1_4('Guild Onboarding');
|
|
return value3;
|
|
}
|
|
|
|
function _fun53435() { // fn#53435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6964:878, offset: 0x0134915e, size: 299 bytes, params: 1, frame: 19
|
|
var icon;
|
|
var r4;
|
|
var value3;
|
|
var value4;
|
|
var defaultImport;
|
|
var value5;
|
|
var moduleValue;
|
|
var makeSource;
|
|
var value;
|
|
const provider_id = connection.provider_id;
|
|
const value2 = null;
|
|
if (value2 != provider_id) {
|
|
value3 = environment.__proto__;
|
|
value4 = undefined;
|
|
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
value5 = defaultImport.get(connection.provider_id);
|
|
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
makeSource = moduleValue.makeSource;
|
|
icon = value2 == value5 ? value4 : value5.icon;
|
|
if (value2 != icon) {
|
|
value = (require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_3);
|
|
icon = value5.icon;
|
|
r4 = value ? icon.darkPNG : icon.lightPNG;
|
|
} else {
|
|
r4 = value2;
|
|
}
|
|
value = Reflect.apply(makeSource, moduleValue, [r4]);
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
return (
|
|
<Icon
|
|
source={value}
|
|
style={{'width': 32, 'height': 32}}
|
|
disableColor
|
|
/>
|
|
);
|
|
}
|
|
value = environment.__proto__;
|
|
const LinkIcon = (LinkIconModule).LinkIcon;
|
|
return <LinkIcon size="lg" color="text-subtle" />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53431, 6786, [5, 31, 661, 33, 4048, 4915, 1244, 6787, 683, 4863, 1423, 4002, 1305, 4056, 6785,
|
|
2]) /* metro module 6786, dependencies: [5, 31, 661, 33, 4048, 4915, 1244, 6787, 683, 4863, 1423, 4002, 1305, 4056, 6785, 2] */;
|