151 lines
10 KiB
TypeScript
151 lines
10 KiB
TypeScript
/* Metro module 13206; source: modules/user_profile/native/UserProfileDisplayNameStylesEditButton.tsx; dependencies: [57, 31, 27, 661, 1376, 33, 4501, 697, 1484, 7013, 1365, 8402, 4635, 8701, 1890, 683, 1244, 13207, 1305, 8411, 8696, 13208, 13209, 2582, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
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 Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
|
|
import * as ProfileCustomizationUtilsModule from '../../profile_customization/ProfileCustomizationUtils.tsx'; /* Metro dependency 8402 */
|
|
import * as UserProfileEditFormControlsModule from './UserProfileEditFormControls.tsx'; /* Metro dependency 13209 */
|
|
|
|
function _fun100766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:6, offset: 0x021f7789, size: 415 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const env0_4 = value.useCallback;
|
|
const env0_5 = value.useMemo;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_7 = value.AnalyticEvents;
|
|
const env0_8 = value.UserSettingsSections;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'height': 48, 'width': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
|
|
'justifyContent': 'center', 'paddingBottom': 4};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object2.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object.ggContainer = object2;
|
|
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
|
object.noneIcon = {tintColor: TEXT_SUBTLE};
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.newBadge = {paddingTop: 0, marginLeft: PX_4};
|
|
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileDisplayNameStylesEditButton.tsx');
|
|
exports.default = UserProfileDisplayNameStylesEditButton;
|
|
function UserProfileDisplayNameStylesEditButton({user, guildId, isTryItOut}) { // fn#100767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:680, offset: 0x021f7928, size: 763 bytes, params: 2, frame: 30
|
|
const styles = useStyles();
|
|
const styles2 = styles;
|
|
const value3 = (UseNavigationNativeModule).useNativeStackNavigation();
|
|
const useSelectedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
let DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE;
|
|
const value5 = styles2(Reflect.apply(useSelectedDismissibleContent, UseSelectedDismissibleContentModule,
|
|
[[DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE], undefined, true]), 2);
|
|
const property = value5[0];
|
|
const property2 = value5[1];
|
|
const {pendingDisplayNameStyles,
|
|
tryItOutDisplayNameStyles} = (ProfileCustomizationUtilsModule).useGuildMemberOrUserPendingDisplayNameStyles(user,
|
|
guildId);
|
|
const value7 = (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: user.id,
|
|
guildId: guildId, pendingDisplayNameStyles: isTryItOut ? tryItOutDisplayNameStyles : pendingDisplayNameStyles});
|
|
const value8 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(value7?.effectId ?? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID);
|
|
const value9 = useCallback(_fun100768, [guildId, isTryItOut, value3, property2]);
|
|
const value10 = useMemo(_fun100769, [value8, value7]);
|
|
const value11 = useCallback(_fun100770, [value7, guildId, user.id, styles]);
|
|
const value12 = useCallback(_fun100771, [value7]);
|
|
const UserProfileEditFormButton = (UserProfileEditFormControlsModule).UserProfileEditFormButton;
|
|
object = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object.label = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['86GtGH']);
|
|
DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE;
|
|
object.labelTrailing = (
|
|
property !== DISPLAY_NAME_STYLES_MOBILE_NEW_BADGE
|
|
? undefined
|
|
: (
|
|
<View {...{['aria-hidden']: true}}>
|
|
{((TextBadge) => <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadge} />)((require(1305) /* metro dependency 1305: native */).TextBadge)}
|
|
</View>
|
|
)
|
|
);
|
|
object.buttonText = value10;
|
|
object.accessibilityValue = {text: value10};
|
|
object.onPress = value9;
|
|
object.leading = value11();
|
|
object.trailing = value12();
|
|
return <UserProfileEditFormButton {...object} />;
|
|
function _fun100768() { // fn#100768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1259, offset: 0x021f7c23, size: 114 bytes, params: 1, frame: 17
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const DISPLAY_NAME_STYLES_FROM_SETTINGS = AnalyticEvents.DISPLAY_NAME_STYLES_FROM_SETTINGS;
|
|
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_FROM_SETTINGS]);
|
|
let binding = env0_4;
|
|
const navigate = binding.navigate;
|
|
const DISPLAY_NAME_STYLES = UserSettingsSections.DISPLAY_NAME_STYLES;
|
|
Reflect.apply(navigate, binding, [DISPLAY_NAME_STYLES, {guildId: guildId, isTryItOut: isTryItOut}]);
|
|
binding = env0_5;
|
|
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
|
binding(TAKE_ACTION);
|
|
}
|
|
|
|
function _fun100769() { // fn#100769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1410, offset: 0x021f7c95, size: 187 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var value2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var value;
|
|
if (ReactNativeModule.View == null) {
|
|
value = environment.__proto__;
|
|
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
|
r0 = value;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
r0 = '' + intl.string((importDefault(13207) /* metro dependency 13207: getDisplayNameStylesFontName */)(ReactNativeModule.View.fontId)) + ' + ' + env0_7.name;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun100770() { // fn#100770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1533, offset: 0x021f7d50, size: 211 bytes, params: 1, frame: 18
|
|
if (ReactNativeModule.View == null) {
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
return <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />;
|
|
} else {
|
|
return (
|
|
<View style={styles.ggContainer}>
|
|
{((Component) => <Component userId={user.id} guildId={guildId} userName="Gg" pendingDisplayNameStyles={ReactNativeModule.View} variant="heading-xl/semibold" />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
function _fun100771() { // fn#100771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13396:1760, offset: 0x021f7e23, size: 91 bytes, params: 1, frame: 18
|
|
var colors;
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
var DisplayNameStylesColorSwatch;
|
|
const value2 = null;
|
|
if (value2 == ReactNativeModule.View) {
|
|
r0 = value2;
|
|
} else {
|
|
value3 = environment.__proto__;
|
|
value4 = undefined;
|
|
DisplayNameStylesColorSwatch = importDefault(13208) /* metro dependency 13208: DisplayNameStylesColorSwatch */;
|
|
colors = value2 == ReactNativeModule.View ? value4 : ReactNativeModule.View.colors;
|
|
r0 = <DisplayNameStylesColorSwatch colors={value2 != colors ? colors : []} />;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun100766, 13206, [57, 31, 27, 661, 1376, 33, 4501, 697, 1484, 7013, 1365, 8402, 4635, 8701, 1890, 683,
|
|
1244, 13207, 1305, 8411, 8696, 13208, 13209, 2582,
|
|
2]) /* metro module 13206, dependencies: [57, 31, 27, 661, 1376, 33, 4501, 697, 1484, 7013, 1365, 8402, 4635, 8701, 1890, 683, 1244, 13207, 1305, 8411, 8696, 13208, 13209, 2582, 2] */;
|