2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 11105
|
|
|
|
|
// Function ID: 11106
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useSafetyHubClassifications
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [19, 11100, 5443, 589, 11, 5442, 5444, 11106, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: useActiveSafetyHubClassifications, useExpiredSafetyHubClassifications, useSafetyHubAppealSignal, useSafetyHubClassification, useSafetyHubClassifications
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 11105 (useSafetyHubClassifications)
|
|
|
|
|
import initialize from "initialize" /* 589 */;
|
|
|
|
|
import closure_4 from "noop" /* 19 */;
|
|
|
|
|
import closure_5 from "handleSafetyHubRequestAgeVerificationResetModalAction" /* 11100 */;
|
|
|
|
|
import { ViolationType } from "SafetyHubView" /* 5443 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
|
|
|
|
const result = require("set").fileFinishedImporting("modules/safety_hub/hooks/useSafetyHubClassifications.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
export const useSafetyHubClassifications = function useSafetyHubClassifications() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
|
|
|
|
const stateFromStoresArray = initialize.useStateFromStoresArray(items, () => classifications.getClassifications());
|
2026-07-20 16:05:17 +00:00
|
|
|
return stateFromStoresArray.sort((id, id2) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj = callback(11);
|
|
|
|
|
const extractTimestampResult = callback(11).extractTimestamp(id2.id);
|
|
|
|
|
return extractTimestampResult - callback(11).extractTimestamp(id.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const useSafetyHubClassification = function useSafetyHubClassification(classificationId) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = classificationId;
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = _require(589);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
|
|
|
|
const stateFromStores = obj.useStateFromStores(items, () => closure_1_5.getClassification(closure_0));
|
|
|
|
|
const items1 = [closure_5];
|
|
|
|
|
const stateFromStores1 = _require(589).useStateFromStores(items1, () => closure_1_5.getClassificationRequestState(closure_0));
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj2 = _require(589);
|
|
|
|
|
let tmp = _require;
|
2026-08-24 06:08:38 +00:00
|
|
|
const items2 = [closure_5];
|
2026-07-29 08:29:29 +00:00
|
|
|
const stateFromStores2 = _require(589).useStateFromStores(items2, () => store.getIsDsaEligible());
|
|
|
|
|
const obj3 = _require(589);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items3 = [closure_5];
|
2026-07-29 08:29:29 +00:00
|
|
|
let stateFromStores3 = _require(589).useStateFromStores(items3, () => store.getIsAppealEligible());
|
|
|
|
|
const obj4 = _require(589);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (obj5.isGuildClassification(stateFromStores)) {
|
|
|
|
|
const guild_metadata = stateFromStores.guild_metadata;
|
|
|
|
|
let member_type;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (guild_metadata != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
member_type = guild_metadata.member_type;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
if (member_type === tmp(5444).MemberType.OWNER) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let GUILD_MEMBER = ViolationType.GUILD_OWNER;
|
|
|
|
|
} else {
|
|
|
|
|
GUILD_MEMBER = ViolationType.GUILD_MEMBER;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
const items4 = [classificationId, stateFromStores, stateFromStores1];
|
|
|
|
|
const effect = React.useEffect(() => {
|
|
|
|
|
let tmp = undefined === stateFromStores;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
tmp = null == stateFromStores1;
|
|
|
|
|
}
|
|
|
|
|
if (tmp) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const safetyHubDataForClassification = stateFromStores1(closure_1_3[7]).getSafetyHubDataForClassification(closure_0);
|
|
|
|
|
const obj = stateFromStores1(closure_1_3[7]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items4);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { classification: null, classificationRequestState: null, isDsaEligible: null, isAppealEligible: null, violationType: null };
|
|
|
|
|
obj[0] = stateFromStores;
|
|
|
|
|
obj[1] = stateFromStores1;
|
|
|
|
|
obj[2] = stateFromStores2;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (stateFromStores3) {
|
|
|
|
|
stateFromStores3 = null != stateFromStores;
|
|
|
|
|
}
|
|
|
|
|
if (stateFromStores3) {
|
|
|
|
|
stateFromStores3 = null == stateFromStores.appeal_status;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[3] = stateFromStores3;
|
|
|
|
|
obj[4] = ViolationType.USER;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const useActiveSafetyHubClassifications = function useActiveSafetyHubClassifications() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
2026-07-29 08:29:29 +00:00
|
|
|
const stateFromStoresArray = date(589).useStateFromStoresArray(items, () => classifications.getClassifications());
|
|
|
|
|
const sorted = stateFromStoresArray.sort((id, id2) => {
|
|
|
|
|
const obj = callback(11);
|
|
|
|
|
const extractTimestampResult = callback(11).extractTimestamp(id2.id);
|
|
|
|
|
return extractTimestampResult - callback(11).extractTimestamp(id.id);
|
|
|
|
|
});
|
|
|
|
|
date = new Date();
|
|
|
|
|
return sorted.filter((max_expiration_time) => {
|
2026-08-24 06:08:38 +00:00
|
|
|
date = new Date(max_expiration_time.max_expiration_time);
|
2026-07-20 16:05:17 +00:00
|
|
|
return date > date;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
export const useExpiredSafetyHubClassifications = function useExpiredSafetyHubClassifications() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
2026-07-29 08:29:29 +00:00
|
|
|
const stateFromStoresArray = date(589).useStateFromStoresArray(items, () => classifications.getClassifications());
|
|
|
|
|
const sorted = stateFromStoresArray.sort((id, id2) => {
|
|
|
|
|
const obj = callback(11);
|
|
|
|
|
const extractTimestampResult = callback(11).extractTimestamp(id2.id);
|
|
|
|
|
return extractTimestampResult - callback(11).extractTimestamp(id.id);
|
|
|
|
|
});
|
|
|
|
|
date = new Date();
|
|
|
|
|
return sorted.filter((max_expiration_time) => {
|
2026-08-24 06:08:38 +00:00
|
|
|
date = new Date(max_expiration_time.max_expiration_time);
|
2026-07-20 16:05:17 +00:00
|
|
|
return date <= date;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
export const useSafetyHubAppealSignal = function useSafetyHubAppealSignal() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
|
|
|
|
return initialize.useStateFromStores(items, () => appealSignal.getAppealSignal());
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|