decord/source/modules/soundboard/native/SoundboardSoundPicker.tsx
2026-08-26 06:04:24 +00:00

118 lines
6.3 KiB
TypeScript

// Module ID: 16489
// Function ID: 16490
// Dependencies: [32, 19, 17, 16490, 4518, 1922, 4918, 16491, 676, 21, 4444, 712, 4184, 647, 16492, 6133, 5541, 5900, 5920, 9565, 503, 500, 8888, 5569, 4313, 4440, 1236, 6167, 16498, 16506, 16507, 2]
// Module 16489
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import withEqualityFn from "withEqualityFn" /* 16490 */;
import closure_8 from "createRTCConnection" /* 4518 */;
import closure_9 from "mergeGuildAvatar" /* 1922 */;
import { SoundboardPickerType } from "MAX_LENGTH_SOUND_NAME" /* 4918 */;
import { EXPRESSION_FOOTER_HEIGHT } from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4444 */;
const require = arg1;
let c4 = importAllResult;
({ setSearchQuery: closure_6, useExpressionPickerStore: error } = withEqualityFn);
({ jsx: closure_12, jsxs: map1 } = jsxProd);
let obj = { title: { marginBottom: 8 }, container: { flex: 1, alignItems: "center" }, header: null, body: null };
obj = { paddingHorizontal: require("SOUND_BUTTON_HEIGHT").SOUND_ROW_HORIZONTAL_PADDING, padding: ThemesDefault.space.PX_8, width: "100%" };
obj[2] = obj;
obj[3] = { flex: 1, width: "100%" };
let closure_14 = createCacheKey.createStyles(obj);
const memoResult = importAllResult.memo(function SoundboardSoundPicker(channel) {
channel = channel.channel;
let stateFromStores;
availableSounds = undefined;
let callback;
const tmp = callback4();
[tmp3, tmp4] = callback(importAllResult.useState(0), 2);
const ref = importAllResult.useRef(null);
let obj = channel(availableSounds[12]);
const sharedValue = obj.useSharedValue(0);
obj1 = channel(availableSounds[13]);
const items = [closure_9];
stateFromStores = obj1.useStateFromStores(items, () => currentUser.getCurrentUser());
let obj2 = channel(availableSounds[13]);
const items1 = [closure_8];
const stateFromStores1 = obj2.useStateFromStores(items1, () => mediaSessionId.getMediaSessionId());
const tmp2 = callback(importAllResult.useState(0), 2);
({ categories, availableSounds } = stateFromStores(availableSounds[14])(channel, { filterOutEmptyCurrentGuild: true }));
const tmp13 = callback2((searchQuery) => searchQuery.searchQuery);
let obj3 = channel(availableSounds[15]);
const tmp12 = stateFromStores(availableSounds[14])(channel, { filterOutEmptyCurrentGuild: true });
[tmp15, c3] = callback(importAllResult.useState(obj3.searchSounds(tmp13, availableSounds, stateFromStores, channel)), 2);
let obj4 = channel(availableSounds[14]);
const searchCategories = obj4.useSearchCategories(categories, tmp15, tmp13);
const tmp14 = callback(importAllResult.useState(obj3.searchSounds(tmp13, availableSounds, stateFromStores, channel)), 2);
const items2 = [channel, stateFromStores, availableSounds];
callback = importAllResult.useCallback((arg0) => {
closure_1_6(arg0);
_undefined(channel(availableSounds[15]).searchSounds(arg0, availableSounds, stateFromStores, channel));
}, items2);
obj = { type: null, name: null, properties: null };
const tmp17 = stateFromStores(availableSounds[17]);
obj[0] = channel(availableSounds[20]).ImpressionTypes.HALFSHEET;
obj[1] = channel(availableSounds[20]).ImpressionNames.SOUNDBOARD_POPOUT;
obj = { source: channel.analyticsSource, guild_id: channel.guild_id, media_session_id: stateFromStores1, type: SoundboardPickerType.FULL_PICKER };
obj[2] = obj;
stateFromStores(availableSounds[19])(obj);
let obj7 = channel(availableSounds[12]);
const sharedValue1 = obj7.useSharedValue(-1);
let obj8 = channel(availableSounds[12]);
const sharedValue2 = obj8.useSharedValue(false);
obj1 = { value: tmp17(stateFromStores(availableSounds[18]).SOUNDBOARD_ACTION_SHEET).analyticsLocations, children: null };
let obj10 = channel(availableSounds[21]);
let isIOSResult = obj10.isIOS();
if (isIOSResult) {
obj2 = { animatedSheetIndex: null, portalHostName: "soundboard-footer", followSystemKeyboard: true };
obj2[0] = sharedValue1;
isIOSResult = callback3(tmp11(tmp7[22]), obj2);
}
const items3 = [isIOSResult, ];
obj3 = { animatedIndex: sharedValue1, scrollable: true, startExpanded: true, footer: null, children: null };
const tmp19 = stateFromStores(availableSounds[19]);
let tmp26;
if (tmp6Result.isAndroid()) {
tmp26 = callback3(tmp6(tmp7[24]).PortalHost, { name: "soundboard-footer" });
}
obj3[3] = tmp26;
obj4 = { style: tmp.container, children: null };
const obj5 = { accessibilityRole: "header", variant: "heading-lg/bold", style: tmp.title, children: null };
const intl = tmp6(tmp7[26]).intl;
obj5[3] = intl.string(channel(availableSounds[26]).t.ABjMWI);
const items4 = [callback3(channel(availableSounds[25]).Text, obj5), , , ];
const obj6 = { style: tmp.header, children: null };
obj7 = { size: "md", placeholder: null, onChange: null };
const intl2 = tmp6(tmp7[26]).intl;
obj7[1] = intl2.string(channel(availableSounds[26]).t.sKt3xS);
obj7[2] = callback;
obj6[1] = callback3(channel(availableSounds[27]).SearchField, obj7);
items4[1] = callback3(View, obj6);
obj8 = { style: tmp.body, children: null };
const obj9 = { listRef: ref, channel, insetBottom: null, scrollPosition: null, setCategoryIndex: null, categories: null, shouldShowPremiumUpsell: null };
const sum = EXPRESSION_FOOTER_HEIGHT + stateFromStores(availableSounds[16])({ isKeyboardAwareOnAndroid: false }).insets.bottom;
obj9[2] = sum + stateFromStores(availableSounds[11]).space.PX_16;
obj9[3] = sharedValue;
obj9[4] = tmp4;
obj9[5] = searchCategories;
obj9[6] = sharedValue2;
obj8[1] = callback3(channel(availableSounds[28]).SoundboardSoundPickerList, obj9);
items4[2] = callback3(View, obj8);
items4[3] = callback3(stateFromStores(availableSounds[29]), { shouldShow: sharedValue2 });
obj4[1] = items4;
const items5 = [closure_13(View, obj4), ];
obj10 = { guildId: channel.guild_id, listRef: ref, categories, categoryIndex: tmp3 };
items5[1] = callback3(stateFromStores(availableSounds[30]), obj10);
obj3[4] = items5;
items3[1] = closure_13(channel(availableSounds[23]).BottomSheet, obj3);
obj1[1] = items3;
return closure_13(channel(availableSounds[17]).AnalyticsLocationProvider, obj1);
});
const result = require("set").fileFinishedImporting("modules/soundboard/native/SoundboardSoundPicker.tsx");
export default memoResult;