93 lines
5.8 KiB
TypeScript
93 lines
5.8 KiB
TypeScript
/* Metro module 11037; source: modules/gif_picker/native/GIFPickerHeader.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6993, 9816, 11038, 6984, 5278, 1244, 11039, 4573, 2] */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as InputTypesNativeModule from '../../../design/components/Input/native/InputTypes.native.tsx'; /* Metro dependency 6993 */
|
|
import * as GifProviderConfigModule from '../experiments/GifProviderConfig.tsx'; /* Metro dependency 9816 */
|
|
import * as GifPickerUtilsModule from '../GifPickerUtils.tsx'; /* Metro dependency 11038 */
|
|
|
|
function _fun84496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11223:6, offset: 0x01f4cdcc, size: 385 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.container = {paddingVertical: PX_8};
|
|
const object3 = {'borderWidth': 1, 'borderColor': 'transparent', 'paddingHorizontal': null, 'height': null,
|
|
'flexDirection': 'row', 'alignItems': 'center'};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object3.paddingHorizontal = PX_8;
|
|
const InputHeights = (InputTypesNativeModule).InputHeights;
|
|
const MD = InputHeights.MD;
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object3.height = MD + PX_4 / 2;
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object3.gap = PX_8;
|
|
object.header = object3;
|
|
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(GIFPickerHeader);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/gif_picker/native/GIFPickerHeader.tsx');
|
|
exports.default = value;
|
|
function GIFPickerHeader({categoryType, onQueryClear, onQueryChange, searchInputRef}) { // fn#84497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11223:467, offset: 0x01f4cf4d, size: 696 bytes, params: 2, frame: 32
|
|
var r4;
|
|
var PressableOpacity;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var UTypEu;
|
|
var object2;
|
|
var items2;
|
|
const styles = useStyles();
|
|
const searchPlaceholder = (GifPickerUtilsModule).getSearchPlaceholder((GifProviderConfigModule).getProviderForAPIRequest());
|
|
const SEARCH = GIFPickerResultTypes.SEARCH;
|
|
if (categoryType === SEARCH) {
|
|
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
|
r4 = (
|
|
<SearchField
|
|
size="md"
|
|
onChange={onQueryChange}
|
|
placeholder={searchPlaceholder}
|
|
onClear={onQueryClear}
|
|
ref={searchInputRef}
|
|
isRound
|
|
/>
|
|
);
|
|
} else {
|
|
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
|
var pressableOpacityProps = {style: styles.header, accessibilityRole: 'button', onPress: onQueryClear};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
UTypEu = t.UTypEu;
|
|
object2 = {};
|
|
object2.destination = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t.ffgJrs);
|
|
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [UTypEu, object2]);
|
|
const ChevronLargeLeftIcon = (require(11039) /* metro dependency 11039: ChevronLargeLeftIcon */).ChevronLargeLeftIcon;
|
|
items2 = [
|
|
<ChevronLargeLeftIcon
|
|
color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE}
|
|
size="sm"
|
|
/>,
|
|
];
|
|
items2[1] = ((Text) => <Text variant="text-sm/semibold" color="text-default" maxFontSizeMultiplier={2}>{categoryType === GIFPickerResultTypes.TRENDING_GIFS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TsWCdW) : categoryType === GIFPickerResultTypes.FAVORITES ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k8fFjp) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
|
r4 = (
|
|
<PressableOpacity {...pressableOpacityProps}>
|
|
{items2}
|
|
</PressableOpacity>
|
|
);
|
|
}
|
|
return (
|
|
<View style={styles.container}>
|
|
{r4}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun84496, 11037, [31, 27, 661, 33, 4501, 697, 6993, 9816, 11038, 6984, 5278, 1244, 11039, 4573,
|
|
2]) /* metro module 11037, dependencies: [31, 27, 661, 33, 4501, 697, 6993, 9816, 11038, 6984, 5278, 1244, 11039, 4573, 2] */;
|