66 lines
4.1 KiB
TypeScript
66 lines
4.1 KiB
TypeScript
/* Metro module 9813; source: modules/gif_picker/FavoriteGIFHooks.tsx; dependencies: [31, 9767, 22, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as FrecencyUserSettingsHooksModule from '../user_settings/FrecencyUserSettingsHooks.tsx'; /* Metro dependency 9767 */
|
|
|
|
function _fun76844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:6, offset: 0x01de756e, size: 174 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const useFavoriteGIFs2 = useFavoriteGIFs;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = {};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/gif_picker/FavoriteGIFHooks.tsx');
|
|
exports.useFavoriteGIFs = useFavoriteGIFs2;
|
|
exports.useSortedFavoriteGIFs = useSortedFavoriteGIFs;
|
|
exports.useShouldShowTooltipOnFavorite = useShouldShowTooltipOnFavorite;
|
|
exports.useIsFavoriteGIF = useIsFavoriteGIF;
|
|
function useFavoriteGIFs() { // fn#76845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:111, offset: 0x01de761c, size: 66 bytes, params: 1, frame: 13
|
|
const value2 = undefined;
|
|
const useFrecencySettings = FrecencyUserSettingsHooksModule.useFrecencySettings;
|
|
const favoriteGifs = Reflect.apply(useFrecencySettings, FrecencyUserSettingsHooksModule, []).favoriteGifs;
|
|
return (favoriteGifs == null ? value2 : favoriteGifs.gifs) ?? env0_4;
|
|
}
|
|
|
|
function useSortedFavoriteGIFs(a0) { // fn#76846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:365, offset: 0x01de765e, size: 62 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
return ReactModule.useMemo(_fun76847, [useFavoriteGIFs(), a0]);
|
|
function _fun76847() { // fn#76847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:441, offset: 0x01de769c, size: 92 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
value = value(env0_1);
|
|
value = value.map(_fun76848);
|
|
value = value.sortBy('order');
|
|
value = value.reverse();
|
|
return value.value();
|
|
function _fun76848(a0, a1) { // fn#76848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:461, offset: 0x01de76f8, size: 84 bytes, params: 3, frame: 17
|
|
const object = {};
|
|
copyDataProperties(object, a0, a1);
|
|
object['url'] = a1;
|
|
const value = environment.__proto__;
|
|
let r2 = env1_0?.(a0.src, a1);
|
|
r2 = r2 ?? a0.src;
|
|
object['src'] = r2;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useShouldShowTooltipOnFavorite() { // fn#76849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:621, offset: 0x01de774c, size: 68 bytes, params: 1, frame: 12
|
|
const value = undefined;
|
|
const useFrecencySettings = FrecencyUserSettingsHooksModule.useFrecencySettings;
|
|
const favoriteGifs = Reflect.apply(useFrecencySettings, FrecencyUserSettingsHooksModule, []).favoriteGifs;
|
|
const hideTooltip = favoriteGifs == null ? value : favoriteGifs.hideTooltip;
|
|
return hideTooltip != null && hideTooltip;
|
|
}
|
|
|
|
function useIsFavoriteGIF(a0) { // fn#76850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:785, offset: 0x01de7790, size: 28 bytes, params: 2, frame: 9
|
|
return useFavoriteGIFs()[a0] != null;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun76844, 9813, [31, 9767, 22, 2]) /* metro module 9813, dependencies: [31, 9767, 22, 2] */;
|