2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 15366
|
|
|
|
|
// Function ID: 15367
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: usePrivateChannelWave
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [5, 32, 19, 676, 4670, 11481, 1222, 7465, 4097, 1236, 11480, 15367, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 15366 (usePrivateChannelWave)
|
|
|
|
|
import closure_3 from "asyncGeneratorStep" /* 5 */;
|
|
|
|
|
import closure_4 from "_slicedToArray" /* 32 */;
|
|
|
|
|
import closure_5 from "noop" /* 19 */;
|
|
|
|
|
import ME from "ME" /* 676 */;
|
|
|
|
|
import { MessageSendLocation } from "MESSAGE_GROUP_SPACING" /* 4670 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
({ ME: closure_6, Routes: error } = ME);
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/channel/usePrivateChannelWave.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function usePrivateChannelWave(id) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = id;
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp = callback2(React.useState(false), 2);
|
|
|
|
|
const first = tmp[0];
|
2026-08-24 06:08:38 +00:00
|
|
|
dependencyMap = tmp[1];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [id.id, first];
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = { waveShouldShow: null, wavePressed: null };
|
|
|
|
|
callback = React.useCallback(callback(function*() {
|
|
|
|
|
if (c5 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
HermesBuiltin.throwTypeError();
|
|
|
|
|
} else if (tmp6 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
let obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
c5 = 2;
|
|
|
|
|
let tmp7 = c4;
|
|
|
|
|
if (0 === c4) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_1 = tmp3;
|
|
|
|
|
closure_0 = tmp7;
|
|
|
|
|
tmp7 = closure_1_1;
|
|
|
|
|
if (!closure_1_1) {
|
|
|
|
|
closure_1_2(true);
|
|
|
|
|
let obj3 = closure_1_0(closure_1_2[5]);
|
|
|
|
|
obj1 = { channelId: null, source: "Messages Tab" };
|
|
|
|
|
obj1[0] = closure_1_0.id;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj3.trackWaveCtaClicked(obj1);
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_1_0(closure_1_2[6]).transitionTo(closure_1_7.CHANNEL(closure_1_6, closure_1_0.id));
|
|
|
|
|
c3 = 1;
|
|
|
|
|
const obj7 = closure_1_1(closure_1_2[7]);
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj2 = { location: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
obj2[0] = closure_1_8.SEND_WAVE;
|
2026-07-29 08:29:29 +00:00
|
|
|
c4 = 2;
|
|
|
|
|
c5 = 1;
|
|
|
|
|
obj3 = { value: null, done: false };
|
2026-08-24 06:08:38 +00:00
|
|
|
obj3[0] = obj7.sendStickers(closure_1_0.id, ["749054660769218631"], "", obj2);
|
2026-07-29 08:29:29 +00:00
|
|
|
return obj3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (1 === tmp7) {
|
|
|
|
|
c3 = 0;
|
|
|
|
|
closure_0 = callback;
|
|
|
|
|
let ok = closure_0.ok;
|
|
|
|
|
if (!ok) {
|
|
|
|
|
ok = 429 !== closure_0.status;
|
|
|
|
|
}
|
|
|
|
|
if (!ok) {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj1 = closure_1_1(closure_1_2[8]);
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj4 = { key: "HANDLE_WAVE_PRESS_TOAST", content: null, icon: null };
|
2026-08-24 06:08:38 +00:00
|
|
|
const intl = closure_1_0(closure_1_2[9]).intl;
|
|
|
|
|
obj4[1] = intl.string(closure_1_0(closure_1_2[9]).t.Whhv4w);
|
|
|
|
|
obj4[2] = closure_1_1(closure_1_2[10]);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj1.open(obj4);
|
|
|
|
|
}
|
|
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c5 = 3;
|
|
|
|
|
throw arg1;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c3 = 0;
|
|
|
|
|
c5 = 3;
|
|
|
|
|
obj = { value: null, done: true };
|
|
|
|
|
obj[0] = arg1;
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
|
|
|
|
c3 = 0;
|
|
|
|
|
}
|
|
|
|
|
tmp7 = callback(false);
|
|
|
|
|
}
|
|
|
|
|
c5 = 3;
|
|
|
|
|
} catch (tmp42) {
|
|
|
|
|
callback = tmp42;
|
|
|
|
|
if (tmp4 === c3) {
|
|
|
|
|
c5 = tmp2;
|
|
|
|
|
throw tmp42;
|
|
|
|
|
} else {
|
|
|
|
|
c4 = tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}), items);
|
2026-08-24 06:08:38 +00:00
|
|
|
obj[0] = _require(15367).usePrivateChannelWaveEligible(id, arg1);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = callback;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
};
|