23 lines
1.8 KiB
TypeScript
23 lines
1.8 KiB
TypeScript
// Metro module 11102 (f11103).
|
|
import FamilyCenterPendingConnectionStore from "../parent_tools/FamilyCenterPendingConnectionStore";
|
|
import * as _useShouldRenderReportFalsePositiveButton from "../explicit_media_redaction/hooks/useShouldRenderReportFalsePositiveButton";
|
|
import { useShouldRenderReportFalsePositiveButton } from "../explicit_media_redaction/hooks/useShouldRenderReportFalsePositiveButton";
|
|
import * as _AgeVerificationUtils from "../age_assurance/AgeVerificationUtils";
|
|
import { isAgeVerificationMessageWithConnectToTeenCta } from "../age_assurance/AgeVerificationUtils";
|
|
import { useStateFromStores } from "../../_bundle/Module589";
|
|
let c7495_3 = {
|
|
MARK_AS_FALSE_POSITIVE: "mark_as_false_positive",
|
|
AGE_VERIFICATION_RETRY: "age_verification_retry",
|
|
CONNECT_TO_TEEN: "connect_to_teen"
|
|
};
|
|
export { c7495_3 as CtaButtonType };
|
|
export function getCtaButtonType(a0, a1) {
|
|
return _useShouldRenderReportFalsePositiveButton.shouldRenderReportFalsePositiveButton(a0) ? c7495_3.MARK_AS_FALSE_POSITIVE : _AgeVerificationUtils.isAgeVerificationMessageWithRetryCta(a1, a0) ? c7495_3.AGE_VERIFICATION_RETRY : isAgeVerificationMessageWithConnectToTeenCta(a1, a0) ? c7495_3.CONNECT_TO_TEEN : void 0;
|
|
}
|
|
export function useCtaButtonType(a0, a1) {
|
|
const shouldRenderReportFalsePositiveButton = useShouldRenderReportFalsePositiveButton(a0);
|
|
const isAgeVerificationMessageWithRetryCta = _AgeVerificationUtils.isAgeVerificationMessageWithRetryCta(a1, a0);
|
|
const r22 = useStateFromStores([FamilyCenterPendingConnectionStore], () => FamilyCenterPendingConnectionStore.getPendingConnection()) != null && isAgeVerificationMessageWithConnectToTeenCta(a1, a0);
|
|
return shouldRenderReportFalsePositiveButton ? c7495_3.MARK_AS_FALSE_POSITIVE : isAgeVerificationMessageWithRetryCta ? c7495_3.AGE_VERIFICATION_RETRY : r22 ? c7495_3.CONNECT_TO_TEEN : void 0;
|
|
}
|