decord/source/modules/soundboard/useSoundOrganizer.tsx

46 lines
1.2 KiB
TypeScript
Raw Normal View History

// Module ID: 17269
// Function ID: 17270
// Name: useSoundOrganizer
2026-07-29 08:29:29 +00:00
// Dependencies: [11, 2]
2026-07-20 16:05:17 +00:00
// Exports: useSoundOrganizer
// Module 17269 (useSoundOrganizer)
import SnowflakeUtilsDefault from "SnowflakeUtils" /* 11 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
function sortSoundsOldestToNewestCreationDate(value7) {
2026-07-20 16:05:17 +00:00
let flag = arg1;
if (arg1 === undefined) {
flag = true;
}
const items = [...value7];
const sorted = items.sort((soundId, soundId2) => SnowflakeUtilsDefault.compare(soundId.soundId, soundId2.soundId));
2026-07-29 08:29:29 +00:00
let sorted1 = sorted;
2026-07-20 16:05:17 +00:00
if (flag) {
2026-07-29 08:29:29 +00:00
const items1 = [];
HermesBuiltin.arraySpread(sorted, 0);
sorted1 = items1.sort((available, available2) => {
if (!available.available) {
let num2 = 0;
2026-07-20 16:05:17 +00:00
if (!available.available) {
2026-07-29 08:29:29 +00:00
num2 = 0;
if (available2.available) {
num2 = 1;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let num = num2;
} else {
num = -1;
}
return num;
});
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return sorted1;
2026-07-20 16:05:17 +00:00
}
const result = size.fileFinishedImporting("modules/soundboard/useSoundOrganizer.tsx");
2026-07-20 16:05:17 +00:00
export { sortSoundsOldestToNewestCreationDate };
export function useSoundOrganizer() {
return sortSoundsOldestToNewestCreationDate;
}