2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 15251
|
|
|
|
|
// Function ID: 15252
|
|
|
|
|
// Name: useCheckpointSound
|
|
|
|
|
// Dependencies: [19, 15246, 504, 9357, 2]
|
|
|
|
|
// Exports: default
|
|
|
|
|
|
|
|
|
|
// Module 15251 (useCheckpointSound)
|
|
|
|
|
import SoundUtils from "SoundUtils" /* 9357 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import CheckpointStore from "CheckpointStore" /* 15246 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
const require = globalThis.__r;
|
2026-10-01 14:13:23 +00:00
|
|
|
let _require;
|
2026-09-28 16:18:32 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let c2;
|
|
|
|
|
let c3;
|
|
|
|
|
let closure_4;
|
|
|
|
|
({ useCallback: c2, useEffect: c3, useRef: closure_4 } = react);
|
2026-09-28 16:18:32 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/checkpoint/native/useCheckpointSound.tsx");
|
|
|
|
|
|
|
|
|
|
export default function useCheckpointSound(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_0;
|
|
|
|
|
let isMuted;
|
|
|
|
|
let stateFromStores;
|
2026-09-28 16:18:32 +00:00
|
|
|
_require = arg0;
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = require("get initialized");
|
2026-09-28 16:18:32 +00:00
|
|
|
const items = [CheckpointStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
stateFromStores = obj.useStateFromStores(items, () => isMuted.isMuted);
|
|
|
|
|
const ref = closure_4(null);
|
|
|
|
|
const tmp2 = closure_3(() => () => {
|
2026-09-28 16:18:32 +00:00
|
|
|
const current = ref.current;
|
|
|
|
|
let stopResult;
|
|
|
|
|
if (current != null) {
|
|
|
|
|
stopResult = current.stop();
|
|
|
|
|
}
|
|
|
|
|
return stopResult;
|
|
|
|
|
}, []);
|
|
|
|
|
const items1 = [stateFromStores, arg0];
|
2026-10-01 14:13:23 +00:00
|
|
|
return ref(() => {
|
|
|
|
|
const tmp = stateFromStores;
|
|
|
|
|
if (!tmp) {
|
2026-09-28 16:18:32 +00:00
|
|
|
const current = ref.current;
|
|
|
|
|
if (current != null) {
|
|
|
|
|
current.stop();
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = SoundUtils;
|
|
|
|
|
ref.current = obj.createSound(closure_0, "vibing_wumpus");
|
|
|
|
|
const current2 = tmp2.current;
|
2026-09-28 16:18:32 +00:00
|
|
|
current2.play();
|
|
|
|
|
}
|
|
|
|
|
}, items1);
|
|
|
|
|
};
|