/* Metro module 6744; source: modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx; dependencies: [31, 27, 6540, 6603, 1881, 33, 4501, 632, 6739, 1423, 1305, 1244, 4573, 6745, 1585, 4080, 6758, 6275, 6277, 4578, 2] */
function _fun53207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:6, offset: 0x0134123d, size: 353 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const guildOnboardingPromptsStore = importDefault(6603) /* metro dependency 6603: GuildOnboardingPromptsStore */;
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({optionTextEmoji: {'fontSize': 24,
'lineHeight': 24, 'paddingTop': 5}, optionImageEmoji: {'height': 24, 'width': 24},
newBadge: {fontWeight: 'bold'}, labelRow: {'display': 'flex', 'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center'}, closeButtonWrapper: {'marginTop': 16,
'marginHorizontal': 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_onboarding/native/DropdownOptionsActionSheet.tsx');
exports.default = DropdownOptionsActionSheet;
}
function DropdownOptionRow({option, responses, onSelect, canBeNew}) { // fn#53208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:499, offset: 0x0134139e, size: 714 bytes, params: 2, frame: 30
var r15;
var r6;
var r5;
var defaultImport;
var TextBadge;
var intl;
const styles = useStyles();
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([EmojiStore],
_fun53209);
const value4 = responses.includes(option.id);
const value5 = env0_3.useCallback(_fun53210, [onSelect, option, value4]);
if (option.emoji?.id != null) {
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
defaultImportProps.src = r15;
r15 = option.emoji?.name ?? '';
defaultImportProps.name = r15;
r6 = {((Component) => )(defaultImport)};
} else if (option.emoji?.name != null) {
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
var defaultImportProps = {textEmojiStyle: styles.optionTextEmoji, fastImageStyle: styles.optionImageEmoji};
r15 = value3 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: value3.id,
animated: value3.animated, size: EMOJI_URL_BASE_SIZE}) : undefined;
defaultImportProps.src = r15;
r15 = option.emoji?.name ?? '';
defaultImportProps.name = r15;
r6 = {((Component) => )(defaultImport)};
} else {
r6 = null;
}
if (canBeNew) {
if (option.isUnseen) {
TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
var textBadgeProps = {color: (require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
textBadgeProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA);
textBadgeProps.textStyle = styles.newBadge;
r5 = ;
} else {
r5 = null;
}
} else {
r5 = null;
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return ((Component) => {option.title}{r5}} selected={value4} leading={r6} trailing={r5} onPress={value5} />)(importDefault(6745) /* metro dependency 6745: FormCheckboxRow */);
}
function DropdownOptionsActionSheet({guildId, promptId, canBeNew, onSelect}) { // fn#53211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:1584, offset: 0x013416d6, size: 625 bytes, params: 2, frame: 32
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const onboardingPrompt = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildOnboardingPromptsStore],
function() {
return GuildOnboardingPromptsStore.getOnboardingPrompt(promptId);
});
const env0_4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([GuildOnboardingPromptsStore],
function() {
return GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, promptId);
});
const value2 = onSelect.useCallback(_fun53214, []);
if (onboardingPrompt == null) {
return null;
}
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
const bottomSheetTitleHeader = ;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {paddingBottom: bottom};
const CardSection = (require(1305) /* metro dependency 1305: native */).CardSection;
string = intl.string;
E2ICbC = (require(1244) /* metro dependency 1244: indexNative */).t.E2ICbC;
const cardSection = {onboardingPrompt.options.map(_fun53215)};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
{cardSection}
);
}
function _fun53209() { // fn#53209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:624, offset: 0x01341668, size: 82 bytes, params: 1, frame: 14
const emoji = option.emoji;
const value2 = null;
const value3 = undefined;
return value2 != (value2 == emoji ? value3 : emoji.id) ? EmojiStore.getUsableCustomEmojiById(value2 == option.emoji ? value3 : option.emoji.id) : value2;
}
function _fun53210() { // fn#53210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:784, offset: 0x013416ba, size: 28 bytes, params: 1, frame: 13
onSelect(option, !env0_2);
}
function _fun53215(a0) { // fn#53215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6922:2297, offset: 0x013419a7, size: 80 bytes, params: 2, frame: 17
const Boolean = global.Boolean;
return (
);
}