2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 12041
|
|
|
|
|
// Function ID: 12042
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: CtaButtonUtils
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [4850, 12042, 4849, 504, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getCtaButtonType, useCtaButtonType
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 12041 (CtaButtonUtils)
|
2026-09-05 10:56:28 +00:00
|
|
|
import initialize from "initialize" /* 504 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import AgeVerificationUtils from "AgeVerificationUtils" /* 4849 */;
|
|
|
|
|
import useShouldRenderReportFalsePositiveButton from "useShouldRenderReportFalsePositiveButton" /* 12042 */;
|
|
|
|
|
import FamilyCenterPendingConnectionStore from "FamilyCenterPendingConnectionStore" /* 4850 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const CtaButtonType = { MARK_AS_FALSE_POSITIVE: "mark_as_false_positive", AGE_VERIFICATION_RETRY: "age_verification_retry", CONNECT_TO_TEEN: "connect_to_teen", AGE_VERIFICATION_MANUAL_REVIEW: "age_verification_manual_review" };
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/messages/CtaButtonUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
export { CtaButtonType };
|
2026-07-20 16:05:17 +00:00
|
|
|
export const getCtaButtonType = function getCtaButtonType(id, channel_id) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = useShouldRenderReportFalsePositiveButton;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (obj.shouldRenderReportFalsePositiveButton(id)) {
|
|
|
|
|
let CONNECT_TO_TEEN = obj.MARK_AS_FALSE_POSITIVE;
|
|
|
|
|
} else {
|
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-09-10 05:38:07 +00:00
|
|
|
if (tmpResult2.isAgeVerificationMessageWithConnectToTeenCta(channel_id, id)) {
|
2026-07-20 16:05:17 +00:00
|
|
|
CONNECT_TO_TEEN = obj.CONNECT_TO_TEEN;
|
|
|
|
|
}
|
2026-09-12 13:45:10 +00:00
|
|
|
tmpResult2 = tmp(4849);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-12 13:45:10 +00:00
|
|
|
tmpResult = tmp(4849);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return CONNECT_TO_TEEN;
|
|
|
|
|
};
|
|
|
|
|
export const useCtaButtonType = function useCtaButtonType(id, channel_id) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = useShouldRenderReportFalsePositiveButton;
|
2026-07-20 16:05:17 +00:00
|
|
|
const shouldRenderReportFalsePositiveButton = obj.useShouldRenderReportFalsePositiveButton(id);
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = AgeVerificationUtils.isAgeVerificationMessageWithRetryCta(channel_id, id);
|
|
|
|
|
const items = [FamilyCenterPendingConnectionStore];
|
2026-08-24 06:08:38 +00:00
|
|
|
let result1 = null != initialize.useStateFromStores(items, () => pendingConnection.getPendingConnection());
|
2026-07-20 16:05:17 +00:00
|
|
|
if (result1) {
|
2026-09-10 05:38:07 +00:00
|
|
|
result1 = AgeVerificationUtils.isAgeVerificationMessageWithConnectToTeenCta(channel_id, id);
|
|
|
|
|
const tmpResult = AgeVerificationUtils;
|
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;
|
|
|
|
|
};
|