// Module ID: 14253 // Function ID: 14254 // Name: getGoreContentSettingOrDefault // Dependencies: [1306, 14250, 5030, 5028, 2] // Exports: isSetAndNotDefault, resolveExplicitContentSettingWithDefaultsForTeen, updateExplicitContentSetting, updateGoreContentSetting // Module 14253 (getGoreContentSettingOrDefault) import set from "set" /* 2 */; import create from "create" /* 1306 */; import resolveExplicitContentSettingWithDefaults from "resolveExplicitContentSettingWithDefaults" /* 5028 */; import result2 from "result" /* 14250 */; function getGoreContentSettingOrDefault(arg0) { const ParentalControlledGoreContent = result2.ParentalControlledGoreContent; let controlledSetting = ParentalControlledGoreContent.getControlledSetting(arg0); if (controlledSetting == null) { controlledSetting = {}; } ({ goreContentNonFriendDm, goreContentFriendDm } = controlledSetting); if (!tmp3) { let tmpResult = tmp(5030); goreContentNonFriendDm = tmpResult.resolveGoreSettingWithDefaultsForTeen({ isDm: true }); } const obj = { goreContentNonFriendDm, goreContentFriendDm: null, goreContentGuilds: null }; tmp3 = null != goreContentNonFriendDm && goreContentNonFriendDm !== create.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION; if (!tmp4) { tmpResult = tmp(5030); goreContentFriendDm = tmpResult.resolveGoreSettingWithDefaultsForTeen({ isDm: true, isFriend: true }); } obj[1] = goreContentFriendDm; obj[2] = create.ExplicitContentRedaction.BLUR; return obj; } function getExplicitContentSettingOrDefault(teenId) { const ParentalControlledExplicitContent = result2.ParentalControlledExplicitContent; const controlledSetting = ParentalControlledExplicitContent.getControlledSetting(teenId); let obj = { teenId, setting: null }; let prop; if (controlledSetting != null) { prop = controlledSetting.explicitContentNonFriendDm; } obj[1] = prop; ({ setting, isFriend, teenId } = obj); if (isFriend === undefined) { isFriend = false; } if (tmp5) { obj = { explicitContentNonFriendDm: null, explicitContentFriendDm: null, explicitContentGuilds: null }; obj[0] = setting; let prop1; if (controlledSetting != null) { prop1 = controlledSetting.explicitContentFriendDm; } if (!tmp10) { const ParentalControlledLegacyExplicitContent2 = tmp(14250).ParentalControlledLegacyExplicitContent; const controlledSetting1 = ParentalControlledLegacyExplicitContent2.getControlledSetting(teenId); prop1 = tmp(5028).TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting1]; } obj[1] = prop1; obj[2] = tmp(1306).ExplicitContentRedaction.BLUR; return obj; } else { const ParentalControlledLegacyExplicitContent = tmp(14250).ParentalControlledLegacyExplicitContent; const controlledSetting2 = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId); let TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM = tmp(5028); if (isFriend) { TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM; let tmp7 = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting2]; } else { tmp7 = TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting2]; } } } let result = set.fileFinishedImporting("modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx"); export const isSetAndNotDefault = function isSetAndNotDefault(goreContentFriendDm) { let tmp = null != goreContentFriendDm; if (tmp) { tmp = goreContentFriendDm !== create.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION; } return tmp; }; export { getGoreContentSettingOrDefault }; export const updateGoreContentSetting = function updateGoreContentSetting(selectedTeenId) { const ParentalControlledGoreContent = result2.ParentalControlledGoreContent; const merged = Object.assign(getGoreContentSettingOrDefault(selectedTeenId)); const merged1 = Object.assign(arg1); const result = ParentalControlledGoreContent.updateControlledSetting(selectedTeenId, {}); }; export const resolveExplicitContentSettingWithDefaultsForTeen = function resolveExplicitContentSettingWithDefaultsForTeen(teenId) { ({ setting, isFriend } = teenId); if (isFriend === undefined) { isFriend = false; } let tmp = null != setting; if (tmp) { tmp = setting !== create.ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION; } if (tmp) { return setting; } else { const ParentalControlledLegacyExplicitContent = result2.ParentalControlledLegacyExplicitContent; const controlledSetting = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId.teenId); const tmp7 = resolveExplicitContentSettingWithDefaults; if (isFriend) { let tmp8 = tmp7.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting]; } else { tmp8 = tmp7.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting]; } return tmp8; } }; export { getExplicitContentSettingOrDefault }; export const updateExplicitContentSetting = function updateExplicitContentSetting(selectedTeenId) { const ParentalControlledExplicitContent = result2.ParentalControlledExplicitContent; const merged = Object.assign(getExplicitContentSettingOrDefault(selectedTeenId)); const merged1 = Object.assign(arg1); const result = ParentalControlledExplicitContent.updateControlledSetting(selectedTeenId, {}); };