This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,26 @@
// Metro module 11089 (f11090).
import { useCallback } from "react";
import SafetyHubStore from "../SafetyHubStore";
import { SafetyHubAnalyticsActionSource } from "../SafetyHubConstants";
import { AnalyticEvents, EMPTY_STRING_SNOWFLAKE_ID } from "../../../Constants";
import { useStateFromStores } from "../../../_bundle/Module589";
import { useSafetyHubClassification } from "./useSafetyHubClassifications";
import { useSafetyHubAccountStanding } from "./useSafetyHubAccountStanding";
import AnalyticsUtils from "../../../utils/AnalyticsUtils";
export function useEmitAppealIngestionEvent() {
let safetyHubClassification, safetyHubAccountStanding, stateFromStores2;
const stateFromStores = useStateFromStores([SafetyHubStore], () => SafetyHubStore.getAppealClassificationId());
safetyHubClassification = useSafetyHubClassification(stateFromStores == null ? EMPTY_STRING_SNOWFLAKE_ID : stateFromStores);
safetyHubAccountStanding = useSafetyHubAccountStanding();
stateFromStores2 = useStateFromStores([SafetyHubStore], () => SafetyHubStore.getIsDsaEligible());
return useCallback((a0) => {
AnalyticsUtils.track(AnalyticEvents.SAFETY_HUB_ACTION, {
action: a0,
account_standing: safetyHubAccountStanding.state,
classification_ids: stateFromStores != null ? [Number(stateFromStores)] : null,
source: SafetyHubAnalyticsActionSource.AppealIngestion,
is_dsa_eligible: stateFromStores2,
violation_type: safetyHubClassification.violationType
});
}, [safetyHubAccountStanding.state, stateFromStores, safetyHubClassification, stateFromStores2]);
}