decord/stable/source/modules/channel/usePrivateChannelWave.native.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

112 lines
3.5 KiB
TypeScript

// Module ID: 16379
// Function ID: 16380
// Name: usePrivateChannelWave
// Dependencies: [5, 32, 19, 1074, 4781, 12547, 1101, 7730, 4486, 1115, 12546, 16380, 2]
// Exports: default
// Module 16379 (usePrivateChannelWave)
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
const require = globalThis.__r;
const require = fn;
const Constants = fn(1074);
({ ME: metroRequire, Routes: closure_7 } = Constants);
const MessageSendLocation = fn(4781).MessageSendLocation;
const size = fn(2);
const result = size.fileFinishedImporting("modules/channel/usePrivateChannelWave.native.tsx");
export default function usePrivateChannelWave(id, arg1) {
_require = id;
[first, dependencyMap] = noop.useState(false);
const items = [id.id, first];
let obj = { waveShouldShow: null, wavePressed: null };
const callback = noop.useCallback(asyncGeneratorStep(async (arg0, value) => {
if (c5 === 2) {
c5 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj3 = { value, done: true };
return obj3;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c5 = 2;
let tmp7 = c4;
if (0 === c4) {
if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c5 = 3;
const obj5 = { value, done: true };
return obj5;
} else {
id = tmp7;
tmp7 = first;
if (!first) {
tmp42(true);
const obj8 = { channelId: id.id, source: "Messages Tab" };
id(tmp42[5]).trackWaveCtaClicked(obj8);
const obj4 = id(tmp42[5]);
id(tmp42[6]).transitionTo(closure_1_7.CHANNEL(closure_1_6, id.id));
c3 = 1;
const obj7 = tmp3(tmp42[7]);
const obj9 = { location: constants.SEND_WAVE };
c4 = 2;
c5 = 1;
const obj10 = { value: obj7.sendStickers(id.id, ["749054660769218631"], "", obj9), done: false };
return obj10;
}
}
} else {
if (1 === tmp7) {
c3 = 0;
closure_128_0 = tmp42;
let ok = closure_128_0.ok;
if (!ok) {
ok = 429 !== closure_128_0.status;
}
if (!ok) {
const obj11 = { key: "HANDLE_WAVE_PRESS_TOAST", content: null, icon: null };
const intl = id(tmp42[9]).intl;
obj11.content = intl.string(id(tmp42[9]).t.Whhv4w);
obj11.icon = tmp3(tmp42[10]);
tmp3(tmp42[8]).open(obj11);
const obj2 = tmp3(tmp42[8]);
}
} else if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
c5 = 3;
const obj = { value, done: true };
return obj;
} else {
c3 = 0;
}
tmp7 = closure_129_2(false);
}
c5 = 3;
} catch (tmp42) {
if (tmp4 === c3) {
c5 = tmp2;
throw tmp42;
} else {
c4 = tmp;
}
}
}
}), items);
obj.waveShouldShow = require("usePrivateChannelWaveEligible").usePrivateChannelWaveEligible(id, arg1);
obj.wavePressed = callback;
return obj;
};