88 lines
5.0 KiB
TypeScript
88 lines
5.0 KiB
TypeScript
/* Metro module 11036; source: modules/gif_picker/native/GIFPickerSearchSuggestions.tsx; dependencies: [31, 27, 9815, 33, 4501, 697, 566, 4573, 1244, 4578, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import GIFPickerViewStore from '../../../stores/views/GIFPickerViewStore.tsx'; /* Metro dependency 9815 */
|
|
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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
|
|
function _fun84491(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:6, offset: 0x01f4cacb, size: 346 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 PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.suggestionsContainer = {'justifyContent': 'center', 'flexDirection': 'row', 'flexWrap': 'wrap', gap: PX_8};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.footerSuggestionsContainer = {justifyContent: 'flex-start', paddingVertical: PX_16};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.footerSuggestionsTitle = {marginBottom: PX_16, textAlign: 'center'};
|
|
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(GIFPickerSearchSuggestions);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/gif_picker/native/GIFPickerSearchSuggestions.tsx');
|
|
exports.default = value;
|
|
function GIFPickerSearchSuggestions({onClickSuggestion}) { // fn#84492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:474, offset: 0x01f4cc25, size: 292 bytes, params: 2, frame: 25
|
|
var r0;
|
|
var Text;
|
|
var intl;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GIFPickerViewStore],
|
|
function() {
|
|
return GIFPickerViewStore.getSuggestions();
|
|
});
|
|
if (value2.length === 0) {
|
|
r0 = null;
|
|
} else {
|
|
var viewBindingProps = {style: styles.footerSuggestionsContainer};
|
|
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
var textProps = {'style': null, 'variant': 'text-md/medium', 'color': 'text-default',
|
|
style: styles.footerSuggestionsTitle};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
value = (
|
|
<Text {...textProps}>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3JGJo2'])}
|
|
</Text>
|
|
);
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
{value}
|
|
<View style={styles.suggestionsContainer}>
|
|
{value2.map(_fun84494)}
|
|
</View>
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _fun84494(a0) { // fn#84494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:877, offset: 0x01f4cd5c, size: 112 bytes, params: 2, frame: 19
|
|
const env0_0 = a0;
|
|
const Button = (ButtonNativeModule).Button;
|
|
const PX_8 = (Native).space.PX_8;
|
|
return (
|
|
<Button
|
|
size="sm"
|
|
variant="secondary"
|
|
hitSlop={PX_8}
|
|
text={a0}
|
|
onPress={onPress_84495}
|
|
key={a0}
|
|
/>
|
|
);
|
|
function onPress_84495() { // fn#84495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:970, offset: 0x0102838e, size: 23 bytes, params: 1, frame: 11
|
|
return onClickSuggestion(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun84491, 11036, [31, 27, 9815, 33, 4501, 697, 566, 4573, 1244, 4578,
|
|
2]) /* metro module 11036, dependencies: [31, 27, 9815, 33, 4501, 697, 566, 4573, 1244, 4578, 2] */;
|