decord/source/modules/gif_picker/native/GIFPickerHeader.tsx

70 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9544
2026-07-27 11:26:19 +00:00
// Function ID: 74488
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 27, 653, 33, 4131, 689, 6684, 9534, 9545, 9171, 4661, 1212, 9546, 4127, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 9544
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import importAllResult from "result";
let closure_5;
let closure_6;
const require = arg1;
require("ME").GIFPickerResultTypes;
({ jsx: closure_5, jsxs: closure_6 } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { paddingVertical: require("_createForOfIteratorHelperLoose").space.PX_8 };
2026-07-20 16:05:17 +00:00
obj.container = obj;
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = { borderWidth: 1, borderColor: "transparent", paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_8, height: require("InputHeights").InputHeights.MD + require("_createForOfIteratorHelperLoose").space.PX_4 / 2, flexDirection: "row", alignItems: "center", gap: require("_createForOfIteratorHelperLoose").space.PX_8 };
obj.header = _createForOfIteratorHelperLoose;
let closure_7 = _createForOfIteratorHelperLoose.createStyles(obj);
const memoResult = require("result").memo(function GIFPickerHeader(arg0) {
2026-07-20 16:05:17 +00:00
let categoryType;
let onQueryChange;
let onQueryClear;
let searchInputRef;
({ categoryType, onQueryClear } = arg0);
({ onQueryChange, searchInputRef } = arg0);
const tmp = callback2();
2026-07-25 08:10:48 +00:00
let obj = require(9534) /* getGifProviderConfig */;
2026-07-20 16:05:17 +00:00
const providerForAPIRequest = obj.getProviderForAPIRequest();
2026-07-25 08:10:48 +00:00
require(9545) /* getSearchPlaceholder */;
2026-07-20 16:05:17 +00:00
obj = { style: tmp.container };
if (categoryType === GIFPickerResultTypes.SEARCH) {
obj = { size: "md", onChange: onQueryChange, placeholder: tmp4, onClear: onQueryClear, ref: searchInputRef, isRound: true };
2026-07-25 08:10:48 +00:00
let tmp18Result = callback(require(9171) /* SearchField */.SearchField, obj);
2026-07-20 16:05:17 +00:00
} else {
const obj1 = { style: tmp.header, accessibilityRole: "button", onPress: onQueryClear };
2026-07-23 10:11:24 +00:00
const intl4 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const obj2 = {};
2026-07-23 10:11:24 +00:00
const intl5 = require(1212) /* getSystemLocale */.intl;
obj2.destination = intl5.string(require(1212) /* getSystemLocale */.t.ffgJrs);
obj1.accessibilityLabel = intl4.formatToPlainString(require(1212) /* getSystemLocale */.t.UTypEu, obj2);
const obj3 = { color: importDefault(689).colors.INTERACTIVE_TEXT_ACTIVE, size: "sm" };
2026-07-25 08:10:48 +00:00
const items = [callback(require(9546) /* ChevronLargeLeftIcon */.ChevronLargeLeftIcon, obj3), ];
2026-07-23 10:11:24 +00:00
const obj4 = { variant: "text-sm/semibold", color: "text-default", maxFontSizeMultiplier: 2 };
2026-07-20 16:05:17 +00:00
if (categoryType === GIFPickerResultTypes.TRENDING_GIFS) {
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
let stringResult = intl3.string(require(1212) /* getSystemLocale */.t.TsWCdW);
2026-07-20 16:05:17 +00:00
} else if (categoryType === GIFPickerResultTypes.FAVORITES) {
2026-07-23 10:11:24 +00:00
const intl2 = require(1212) /* getSystemLocale */.intl;
stringResult = intl2.string(require(1212) /* getSystemLocale */.t.k8fFjp);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
stringResult = intl.string(require(1212) /* getSystemLocale */.t["5h0QOP"]);
2026-07-20 16:05:17 +00:00
}
obj4.children = stringResult;
2026-07-25 08:10:48 +00:00
items[1] = callback(require(4127) /* Text */.Text, obj4);
2026-07-20 16:05:17 +00:00
obj1.children = items;
2026-07-25 08:10:48 +00:00
tmp18Result = closure_6(require(4661) /* PressableBase */.PressableOpacity, obj1);
2026-07-20 16:05:17 +00:00
const tmp18 = closure_6;
const tmp21 = callback;
}
obj.children = tmp18Result;
return callback(View, obj);
});
2026-07-23 10:11:24 +00:00
const result = require("ME").fileFinishedImporting("modules/gif_picker/native/GIFPickerHeader.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;