/* Metro module 8053; source: modules/application_commands/ApplicationCommandChoiceUtils.tsx; dependencies: [7167, 5066, 2] */ function _fun63878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:6, offset: 0x01b94379, size: 188 bytes, params: 8, frame: 20 const closure = function(a0, a1) { var r0; var value2; var env0_0 = a1; var value = undefined; if (a0 == null) { r0 = value; } else { value2 = a0.find(_fun63880); r0 = value2 == null ? value : value2.value; } return typeof r0 === 'string' ? r0 : value; }; const closure2 = function(a0, a1) { var r0; var value2; var env0_0 = a1; var value = undefined; if (a0 == null) { r0 = value; } else { value2 = a0.find(_fun63882); r0 = value2 == null ? value : value2.value; } return typeof r0 === 'number' ? r0 : value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */; const applicationCommandConstantsModule = require(5066) /* metro dependency 5066: ApplicationCommandConstants */; const env0_1 = applicationCommandConstantsModule.FALSE_OPTION_NAME; const env0_2 = applicationCommandConstantsModule.TRUE_OPTION_NAME; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandChoiceUtils.tsx'); exports.toChoiceBooleanValue = function(a0) { var value = a0.toLowerCase(); value = value === TRUE_OPTION_NAME.toLowerCase(); var value3 = a0.toLowerCase(); var value4 = FALSE_OPTION_NAME.toLowerCase(); if (value) { return value; } if (value3 === value4) { return value; } }; exports.findChoiceStringValue = closure; exports.findChoiceNumberValue = closure2; exports.findAutocompleteChoiceStringValue = findAutocompleteChoiceStringValue; exports.findAutocompleteChoiceNumberValue = findAutocompleteChoiceNumberValue; } function findChoiceStringValue(a0, a1) { // fn#63879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:159, offset: 0x01b94435, size: 70 bytes, params: 3, frame: 14 var r0; var value2; const env0_0 = a1; const value = undefined; if (a0 == null) { r0 = value; } else { value2 = a0.find(function({displayName}) { return displayName === require; }); r0 = value2 == null ? value : value2.value; } return typeof r0 === 'string' ? r0 : value; } function findChoiceNumberValue(a0, a1) { // fn#63881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:299, offset: 0x01b94490, size: 70 bytes, params: 3, frame: 14 var r0; var value2; const env0_0 = a1; const value = undefined; if (a0 == null) { r0 = value; } else { value2 = a0.find(function({displayName}) { return displayName === require; }); r0 = value2 == null ? value : value2.value; } return typeof r0 === 'number' ? r0 : value; } function findAutocompleteChoiceStringValue(a0, a1, a2) { // fn#63884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:813, offset: 0x01b9451d, size: 42 bytes, params: 4, frame: 14 return findChoiceStringValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2); } function findAutocompleteChoiceNumberValue(a0, a1, a2) { // fn#63885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:966, offset: 0x01b94547, size: 42 bytes, params: 4, frame: 14 return findChoiceNumberValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2); }