97 lines
5.3 KiB
TypeScript
97 lines
5.3 KiB
TypeScript
/* Metro module 11042; source: modules/gif_picker/native/GIFPickerItemView.tsx; dependencies: [31, 27, 33, 4501, 11035, 697, 1848, 4080, 11043, 1962, 1244, 5278, 5475, 2] */
|
|
function _fun84516(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:6, offset: 0x01f4d9ad, size: 219 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
|
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84517);
|
|
value = value.memo(_fun84518);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerItemView.tsx');
|
|
exports.default = _default_84519;
|
|
exports.GIFPickerItemPlaceholder = value;
|
|
}
|
|
|
|
function _fun84517(a0, a1, a2, a3) { // fn#84517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:159, offset: 0x01f4da88, size: 255 bytes, params: 5, frame: 18
|
|
const object4 = {};
|
|
const object5 = {};
|
|
const GIF_PICKER_GUTTER_SPACING = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_GUTTER_SPACING;
|
|
object5.paddingBottom = GIF_PICKER_GUTTER_SPACING;
|
|
const value2 = 0;
|
|
object5.paddingLeft = value2 === a1 ? value2 : GIF_PICKER_GUTTER_SPACING / 2;
|
|
object5.paddingRight = a1 === a0 - 1 ? value2 : GIF_PICKER_GUTTER_SPACING / 2;
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object5.width = a2;
|
|
object5.height = a3;
|
|
object5.flex = 1;
|
|
object4.container = object5;
|
|
const object6 = {};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object6.backgroundColor = BORDER_SUBTLE;
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object6.flex = 1;
|
|
object4.gifImage = object6;
|
|
return object4;
|
|
}
|
|
|
|
function _fun84518(a0) { // fn#84518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:508, offset: 0x01f4db87, size: 89 bytes, params: 2, frame: 18
|
|
const styles = useStyles(a0.columns, a0.columnIndex, a0.width, a0.height);
|
|
return (
|
|
<View style={styles.container}>
|
|
<View style={styles.gifImage} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _default_84519({onPressGIF, item, index, columns, columnIndex, width, height}) { // fn#84519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:655, offset: 0x01f4dbe0, size: 294 bytes, params: 2, frame: 23
|
|
const styles = useStyles(columns, columnIndex, width, height);
|
|
const binding = env0_3;
|
|
const value2 = binding.useCallback(_fun84520, [item, index, onPressGIF]);
|
|
const value3 = binding.useCallback(_fun84521, [item]);
|
|
const value4 = binding.useMemo(_fun84522, [index, item.src]);
|
|
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
|
return (
|
|
<PressableOpacity
|
|
style={styles.container}
|
|
accessibilityRole="button"
|
|
accessibilityLabel={value4}
|
|
onPress={value2}
|
|
onLongPress={value3}
|
|
>
|
|
{((Component) => <Component style={styles.gifImage} source={{uri: item.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
|
</PressableOpacity>
|
|
);
|
|
}
|
|
|
|
function _fun84520() { // fn#84520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:764, offset: 0x01f4dd06, size: 58 bytes, params: 1, frame: 13
|
|
onPressGIF(item, index);
|
|
const value = environment.__proto__;
|
|
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
|
}
|
|
|
|
function _fun84521() { // fn#84521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:836, offset: 0x01f4dd40, size: 122 bytes, params: 1, frame: 20
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[7]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[9]);
|
|
value = value(dependencyMap[8], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'GIFPickerItemActionSheet', {item: item}, 'stack']);
|
|
require(dependencyMap[6]).dismissGlobalKeyboard();
|
|
}
|
|
|
|
function _fun84522() { // fn#84522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:977, offset: 0x01f4ddba, size: 154 bytes, params: 1, frame: 17
|
|
var value6;
|
|
var intl;
|
|
const value3 = item.src.split('/').pop();
|
|
let r0 = value3 == null ? undefined : value3.split('.')[0];
|
|
if (r0 == null) {
|
|
value6 = environment.__proto__;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['5iIGZI'],
|
|
{index: index + 1});
|
|
}
|
|
return r0;
|
|
}
|
|
|