decord/source/modules/messages/CtaButtonUtils.tsx

56 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11135
// Function ID: 11136
2026-07-20 16:05:17 +00:00
// Name: CtaButtonType
2026-08-24 06:08:38 +00:00
// Dependencies: [4998, 11136, 4997, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: getCtaButtonType, useCtaButtonType
2026-08-24 06:08:38 +00:00
// Module 11135 (CtaButtonType)
import initialize from "initialize" /* 589 */;
import useAgeVerificationRunner from "useAgeVerificationRunner" /* 4997 */;
import shouldRenderReportFalsePositiveButton2 from "shouldRenderReportFalsePositiveButton" /* 11136 */;
import closure_2 from "initialize" /* 4998 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-23 10:11:24 +00:00
let obj = { MARK_AS_FALSE_POSITIVE: "mark_as_false_positive", AGE_VERIFICATION_RETRY: "age_verification_retry", CONNECT_TO_TEEN: "connect_to_teen" };
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/messages/CtaButtonUtils.tsx");
2026-07-20 16:05:17 +00:00
export const CtaButtonType = obj;
export const getCtaButtonType = function getCtaButtonType(id, channel_id) {
2026-08-24 06:08:38 +00:00
obj = shouldRenderReportFalsePositiveButton2;
2026-07-20 16:05:17 +00:00
if (obj.shouldRenderReportFalsePositiveButton(id)) {
let CONNECT_TO_TEEN = obj.MARK_AS_FALSE_POSITIVE;
} else {
2026-08-24 06:08:38 +00:00
let tmpResult = tmp(4997);
2026-07-29 08:29:29 +00:00
if (tmpResult.isAgeVerificationMessageWithRetryCta(channel_id, id)) {
2026-07-20 16:05:17 +00:00
CONNECT_TO_TEEN = obj.AGE_VERIFICATION_RETRY;
} else {
2026-08-24 06:08:38 +00:00
tmpResult = tmp(4997);
2026-07-29 08:29:29 +00:00
if (tmpResult.isAgeVerificationMessageWithConnectToTeenCta(channel_id, id)) {
2026-07-20 16:05:17 +00:00
CONNECT_TO_TEEN = obj.CONNECT_TO_TEEN;
}
}
}
return CONNECT_TO_TEEN;
};
export const useCtaButtonType = function useCtaButtonType(id, channel_id) {
2026-08-24 06:08:38 +00:00
obj = shouldRenderReportFalsePositiveButton2;
2026-07-20 16:05:17 +00:00
const shouldRenderReportFalsePositiveButton = obj.useShouldRenderReportFalsePositiveButton(id);
2026-08-24 06:08:38 +00:00
const result = useAgeVerificationRunner.isAgeVerificationMessageWithRetryCta(channel_id, id);
const obj2 = useAgeVerificationRunner;
2026-07-29 08:29:29 +00:00
const tmp = require;
2026-08-24 06:08:38 +00:00
const items = [closure_2];
let result1 = null != initialize.useStateFromStores(items, () => pendingConnection.getPendingConnection());
2026-07-20 16:05:17 +00:00
if (result1) {
2026-08-24 06:08:38 +00:00
result1 = useAgeVerificationRunner.isAgeVerificationMessageWithConnectToTeenCta(channel_id, id);
const tmpResult = useAgeVerificationRunner;
2026-07-20 16:05:17 +00:00
}
if (shouldRenderReportFalsePositiveButton) {
let CONNECT_TO_TEEN = obj.MARK_AS_FALSE_POSITIVE;
} else if (result) {
CONNECT_TO_TEEN = obj.AGE_VERIFICATION_RETRY;
} else if (result1) {
CONNECT_TO_TEEN = obj.CONNECT_TO_TEEN;
}
return CONNECT_TO_TEEN;
};