2026-07-31 08:44:05 +00:00
// Module ID: 12235
// Function ID: 12236
2026-07-20 16:05:17 +00:00
// Name: AddFriendNicknameModal
2026-07-31 08:44:05 +00:00
// Dependencies: [5, 32, 19, 17, 3830, 1874, 21, 4193, 712, 589, 1236, 4399, 8927, 5642, 4622, 4189, 6736, 4032, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-31 08:44:05 +00:00
// Module 12235 (AddFriendNicknameModal)
2026-07-29 08:29:29 +00:00
import mergeGuildAvatar from "mergeGuildAvatar" ;
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
2026-07-29 08:29:29 +00:00
import noop from "noop" ;
import { View } from "nameFromUser" ;
import upsertRelationship from "upsertRelationship" ;
import closure_8 from "mergeGuildAvatar" ;
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd" ;
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey" ;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10 ;
let c9 ;
2026-07-23 10:11:24 +00:00
const require = arg1 ;
2026-07-29 08:29:29 +00:00
( { jsx : c9 , jsxs : c10 } = jsxProd ) ;
createCacheKey = { container : null , title : null , description : null } ;
createCacheKey = { flex : 1 , backgroundColor : require ( "Themes" ) . colors . BACKGROUND_SCRIM , justifyContent : "center" , alignItems : "center" } ;
createCacheKey [ 0 ] = createCacheKey ;
createCacheKey [ 1 ] = { textAlign : "center" } ;
createCacheKey [ 2 ] = { marginTop : 8 , marginBottom : 16 , textAlign : "center" , lineHeight : 18 } ;
createCacheKey = createCacheKey . createStyles ( createCacheKey ) ;
const result = require ( "noop" ) . fileFinishedImporting ( "modules/user_profile/native/AddFriendNicknameModal.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default function AddFriendNicknameModal ( arg0 ) {
2026-07-29 08:29:29 +00:00
let c2 ;
let c3 ;
2026-07-23 10:11:24 +00:00
let require ;
2026-07-20 16:05:17 +00:00
let showUserProfile ;
2026-07-23 10:11:24 +00:00
( { userId : require , showUserProfile } = arg0 ) ;
let dependencyMap ;
2026-07-29 08:29:29 +00:00
c3 = undefined ;
2026-07-20 16:05:17 +00:00
let callback ;
2026-07-23 10:11:24 +00:00
let callback1 ;
2026-07-20 16:05:17 +00:00
function _handleSubmit() {
2026-07-29 08:29:29 +00:00
const self = this ;
const tmp = _undefined2 ( function * ( ) {
if ( v0 === 2 ) {
v0 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp6 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
return { value : "HermesInternal" , done : null } ;
}
} else {
try {
v0 = 2 ;
if ( 0 === table ) {
if ( arg0 === 1 ) {
v0 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
v0 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
let closure_1 = tmp3 ;
if ( table ) {
v0 = 3 ;
} else {
outer1_3 ( true ) ;
let ref = 1 ;
let obj1 = outer1_1 ( table [ 12 ] ) ;
const current = ref . current ;
let c0 = current ;
if ( current == null ) {
c0 = "" ;
}
table = 2 ;
v0 = 1 ;
obj1 = { value : null , done : false } ;
obj1 [ 0 ] = obj1 . updateRelationship ( outer1_0 , c0 ) ;
return obj1 ;
}
}
} else if ( 1 === tmp7 ) {
ref = 0 ;
callback ( false ) ;
throw callback ;
} else if ( arg0 === 1 ) {
v0 = 3 ;
throw arg1 ;
} else if ( arg0 !== 2 ) {
v0 ( ) ;
ref = 0 ;
callback ( false ) ;
}
ref = 0 ;
callback ( false ) ;
v0 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} catch ( tmp29 ) {
callback = tmp29 ;
if ( tmp4 === ref ) {
v0 = tmp2 ;
throw tmp29 ;
} else {
table = tmp ;
}
}
}
} ) ;
const _handleSubmit = tmp ;
const apply = tmp . apply ;
if ( typeof apply === "unknown" ) {
let applyArgumentsResult = HermesBuiltin . applyArguments ( self ) ;
} else {
applyArgumentsResult = apply ( self , arguments ) ;
}
return applyArgumentsResult ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp = createCacheKey ( ) ;
let obj = callback1 ;
[ c2 , c3 ] = callback ( callback1 . useState ( false ) , 2 ) ;
let obj1 = require ( 589 ) /* initialize */ ;
const items = [ upsertRelationship ] ;
const stateFromStores = obj1 . useStateFromStores ( items , ( ) = > outer1_7 . getNickname ( closure_0 ) ) ;
let tmp6 = stateFromStores ;
if ( stateFromStores == null ) {
tmp6 = null ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
callback = callback1 . useRef ( tmp6 ) ;
callback = obj . useCallback ( ( current ) = > {
2026-07-23 10:11:24 +00:00
_slicedToArray . current = current ;
2026-07-20 16:05:17 +00:00
} , [ ] ) ;
2026-07-29 08:29:29 +00:00
const tmp2 = callback ( callback1 . useState ( false ) , 2 ) ;
2026-07-20 16:05:17 +00:00
const items1 = [ closure_8 ] ;
2026-07-29 08:29:29 +00:00
const stateFromStores1 = require ( 589 ) /* initialize */ . useStateFromStores ( items1 , ( ) = > outer1_8 . getUser ( closure_0 ) ) ;
2026-07-20 16:05:17 +00:00
if ( null == stateFromStores ) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp3 ( 1236 ) . intl ;
let stringResult = intl2 . string ( tmp3 ( 1236 ) . t . BGYkaH ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp3 ( 1236 ) . intl ;
stringResult = intl . string ( tmp3 ( 1236 ) . t [ "8pOYUE" ] ) ;
2026-07-20 16:05:17 +00:00
}
const items2 = [ showUserProfile ] ;
2026-07-29 08:29:29 +00:00
callback1 = obj . useCallback ( ( ) = > {
let arr = showUserProfile ( _undefined [ 11 ] ) ;
2026-07-20 16:05:17 +00:00
arr = arr . pop ( ) ;
2026-07-29 08:29:29 +00:00
if ( showUserProfile != null ) {
2026-07-20 16:05:17 +00:00
showUserProfile ( ) ;
}
} , items2 ) ;
2026-07-29 08:29:29 +00:00
obj = { style : tmp.container , children : null } ;
obj = { children : null } ;
const tmp3Result = require ( 589 ) /* initialize */ ;
obj1 = { confirmText : null , onConfirm : null , cancelText : null , onCancel : null , children : null } ;
2026-07-31 08:44:05 +00:00
const tmp11 = showUserProfile ( 5642 ) ;
2026-07-29 08:29:29 +00:00
const intl3 = tmp3 ( 1236 ) . intl ;
obj1 [ 0 ] = intl3 . string ( require ( 1236 ) /* getSystemLocale */ . t [ "R3BPH+" ] ) ;
obj1 [ 1 ] = function handleSubmit() {
const self = this ;
const apply = _handleSubmit . apply ;
if ( typeof apply === "unknown" ) {
let applyArgumentsResult = HermesBuiltin . applyArguments ( self ) ;
} else {
applyArgumentsResult = apply ( self , arguments ) ;
}
return applyArgumentsResult ;
2026-07-20 16:05:17 +00:00
} ;
2026-07-29 08:29:29 +00:00
const intl4 = tmp3 ( 1236 ) . intl ;
obj1 [ 2 ] = intl4 . string ( require ( 1236 ) /* getSystemLocale */ . t [ "ETE/oC" ] ) ;
obj1 [ 3 ] = callback1 ;
2026-07-31 08:44:05 +00:00
const items3 = [ callback2 ( require ( 4189 ) /* Text */ . Text , { style : tmp.title , accessibilityRole : "header" , variant : "heading-lg/extrabold" , color : "mobile-text-heading-primary" , children : stringResult } ) , , ] ;
2026-07-29 08:29:29 +00:00
const obj3 = { style : tmp.description , variant : "text-sm/medium" , color : "text-default" , children : null } ;
const intl5 = tmp3 ( 1236 ) . intl ;
obj3 [ 3 ] = intl5 . string ( require ( 1236 ) /* getSystemLocale */ . t [ "NdQ+lP" ] ) ;
2026-07-31 08:44:05 +00:00
items3 [ 1 ] = callback2 ( require ( 4189 ) /* Text */ . Text , obj3 ) ;
2026-07-23 10:11:24 +00:00
const obj4 = { onChange : callback , autoFocus : true , placeholder : null , defaultValue : null , maxLength : 32 , isClearable : true } ;
2026-07-29 08:29:29 +00:00
const obj2 = { style : tmp.title , accessibilityRole : "header" , variant : "heading-lg/extrabold" , color : "mobile-text-heading-primary" , children : stringResult } ;
2026-07-31 08:44:05 +00:00
const tmp12 = showUserProfile ( 4622 ) ;
obj4 [ 2 ] = showUserProfile ( 4032 ) . getName ( stateFromStores1 ) ;
2026-07-29 08:29:29 +00:00
obj4 [ 3 ] = stateFromStores ;
2026-07-31 08:44:05 +00:00
items3 [ 2 ] = callback2 ( require ( 6736 ) /* TextField */ . TextField , obj4 ) ;
2026-07-29 08:29:29 +00:00
obj1 [ 4 ] = items3 ;
obj [ 0 ] = callback3 ( tmp12 , obj1 ) ;
obj [ 1 ] = callback2 ( tmp11 , obj ) ;
2026-07-20 16:05:17 +00:00
return callback2 ( _handleSubmit , obj ) ;
} ;