/* Metro module 9894; source: modules/group_dm/native/ChatGDMCustomize.tsx; dependencies: [5, 57, 31, 27, 1379, 33, 4501, 697, 5463, 566, 4805, 6518, 1423, 9895, 4603, 1244, 3857, 7684, 9896, 5278, 4573, 7981, 4578, 9898, 2] */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import AvatarUtils from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */ import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */ import UseInitialValue from '../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */ import UseAnnounceAsyncCompletionNative from '../../a11y/native/useAnnounceAsyncCompletion.native.tsx'; /* Metro dependency 9895 */ 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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ function _fun77540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:6, offset: 0x01e0059a, size: 522 bytes, params: 8, frame: 24 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const createStyles = CreateStylesModule.createStyles; object = {}; const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND; object.container = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND}; const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24; object.iconUploader = {marginTop: PX_24, alignSelf: 'center'}; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.iconClear = {marginTop: PX_8, alignSelf: 'center'}; const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.textInput = {marginVertical: PX_16}; const object4 = {}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object4.marginTop = PX_8; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object4.gap = PX_8; object4.flexDirection = 'row'; object4.alignItems = 'center'; object.rateLimitedContainer = object4; const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL; object.rateLimitedText = {fontSize: 12, color: TEXT_FEEDBACK_CRITICAL}; const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [object]); value = value.memo(value.forwardRef(_fun77541)); (FileImportTrackerModule).fileFinishedImporting('modules/group_dm/native/ChatGDMCustomize.tsx'); exports.default = value; function _fun77541({channelId, onFinish}, a1) { // fn#77541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:689, offset: 0x01e007a4, size: 1603 bytes, params: 3, frame: 39 var scrollView; var object2; var items2; const Text = (TextModule).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; var TextInput; var object3; var Button; var object4; var value32; let env0_5 = undefined; const styles = useStyles(); const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets; const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }); const r8 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel) ?? ''; const value6 = (UseInitialValue)(r8); const env0_3 = value6; let binding = env0_5; const value7 = binding.useRef(null); const env0_4 = value7; let useState = binding.useState; const value9 = env0_4(Reflect.apply(useState, binding, [undefined]), 2); const property = value9[0]; env0_5 = property; const property2 = value9[1]; const r6 = property != null && property.length > 0 && property !== value6; const [property3, property4] = env0_4(env0_5.useState(undefined), 2); const r18 = property3 === 'CLEARED_ICON' ? undefined : property3 ?? channel?.icon; const value15 = channel?.isManaged() !== true; const r9 = value15 && (property3 != null && property3 !== 'CLEARED_ICON' || channel?.icon != null); binding = env0_5; const value19 = binding.useMemo(function() { return {makeURL: _fun77544, clear: _fun77545}; }, [channel, channelId]); const value20 = binding.useCallback(_fun77546, [r6, property3]); const value21 = binding.useState(null); const binding2 = env0_4; const value22 = binding2(value21, 2); const property5 = value22[0]; const env0_11 = value22[1]; useState = binding.useState; const value23 = binding2(Reflect.apply(useState, binding, [false]), 2); const property6 = value23[0]; const env0_12 = value23[1]; const value26 = binding.useCallback(env0_3(_fun77548), [(UseAnnounceAsyncCompletionNative)(), channelId, property, property3, onFinish]); binding.useEffect(_fun77549, [value6]); binding.useEffect(_fun77550, [property5]); binding.useImperativeHandle(a1, _fun77552); if (channel == null) { scrollView = ; } else { var scrollViewBindingProps = {style: styles.container}; object2 = {}; object2.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.paddingBottom = insets.bottom; scrollViewBindingProps.contentContainerStyle = object2; items2 = [ ((Component) => )(importDefault(9896) /* metro dependency 9896: IconUploader */), ]; items2[1] = ( r9 ? ((PressableOpacity) => {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uY+Nk/'])})((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : null ); var viewBindingProps2 = {style: styles.textInput}; TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput; items2[2] = ( ); Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; var buttonProps = {onPress: value26, text: intl.string(t.K344S7), variant: value20() ? 'primary' : 'secondary'}; value32 = value20(); buttonProps.disabled = value32 ? property5 != null : !value32; buttonProps.loading = property6; items2[3] =