// Module ID: 10507 // Function ID: 10508 // Name: GIFPickerItemView // Dependencies: [19, 17, 21, 4636, 10497, 576, 1874, 4603, 10508, 1896, 1114, 5204, 5668, 2] // Exports: default // Module 10507 (GIFPickerItemView) import nativeDefault from "native" /* 576 */; import util from "util" /* 1114 */; import KeyboardManagerUtils from "KeyboardManagerUtils" /* 1874 */; import asyncRequireImpl from "asyncRequireImpl" /* 1896 */; import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4603 */; import gif_picker_GIFPickerUtils from "gif_picker/GIFPickerUtils" /* 10497 */; import noop from "module_19" /* 19 */; require = fn; const View = fn(17).View; const jsx = fn(21).jsx; const createStyles = fn(4636); let closure_6 = createStyles.createStyles((height) => { const obj = { container: null, gifImage: null, gifImageSelected: null }; const size = { paddingBottom: gif_picker_GIFPickerUtils.GIF_PICKER_GUTTER_SPACING, paddingHorizontal: gif_picker_GIFPickerUtils.GIF_PICKER_GUTTER_SPACING / 2, borderRadius: nativeDefault.radii.xs, width: "100%", height, flex: 1 }; obj.container = size; obj.gifImage = { backgroundColor: nativeDefault.colors.BORDER_SUBTLE, borderRadius: nativeDefault.radii.xs, flex: 1 }; const obj2 = { backgroundColor: nativeDefault.colors.BORDER_SUBTLE, borderRadius: nativeDefault.radii.xs, flex: 1 }; obj.gifImageSelected = { borderWidth: 2, borderColor: nativeDefault.colors.BACKGROUND_BRAND }; return obj; }); let size = fn(2); let result = size.fileFinishedImporting("modules/gif_picker/native/GIFPickerItemView.tsx"); export default function GIFPickerItemView(onPressGIF) { onPressGIF = onPressGIF.onPressGIF; const item = onPressGIF.item; const index = onPressGIF.index; const selected = onPressGIF.selected; const tmp = closure_6(onPressGIF.height); const items = [item, index, onPressGIF]; const items1 = [item]; const callback = noop.useCallback(() => { onPressGIF(item, index); const result = KeyboardManagerUtils.dismissGlobalKeyboard(); }, items); const items2 = [index, item.src]; const callback1 = noop.useCallback(() => { ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(10508, dependencyMap.paths), "GIFPickerItemActionSheet", { item }, "stack"); const obj2 = { item }; const result = KeyboardManagerUtils.dismissGlobalKeyboard(); }, items1); const memo = noop.useMemo(() => { const parts = item.src.split("/"); const str2 = parts.pop(); let first; if (str2 != null) { first = str2.split(".")[0]; } if (null == first) { const intl = util.intl; const obj = { index: index + 1 }; first = intl.formatToPlainString(util.t["5iIGZI"], obj); } return first; }, items2); let obj = { style: tmp.container, accessibilityRole: "button", accessibilityLabel: memo, accessibilityState: null, onPress: null, onLongPress: null, children: null }; let tmp7; if (null != selected) { let obj2 = { selected }; tmp7 = obj2; } obj.accessibilityState = tmp7; obj.onPress = callback; obj.onLongPress = callback1; if (true === selected) { const items3 = [, ]; ({ gifImage: arr4[0], gifImageSelected: arr4[1] } = tmp); let gifImage = items3; } else { gifImage = tmp.gifImage; } obj.children = jsx(item(index[12]), { style: gifImage, source: { uri: item.src } }); return jsx(onPressGIF(index[11]).PressableOpacity, { style: tmp.container, accessibilityRole: "button", accessibilityLabel: memo, accessibilityState: null, onPress: null, onLongPress: null, children: null }); }; export const GIFPickerItemPlaceholder = noop.memo((height) => { const tmp = closure_6(height.height); const obj = { style: tmp.container, children: }; return ; });