/* Metro module 13185; source: modules/user_profile/native/ChangeBannerActionSheet.tsx; dependencies: [5, 31, 27, 7624, 661, 33, 4501, 697, 6771, 3802, 4080, 4660, 6805, 6758, 1244, 7954, 6231, 6238, 7972, 13186, 566, 8403, 8490, 8421, 673, 8400, 13187, 4573, 1305, 13188, 13189, 2] */
function _fun100641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:6, offset: 0x021f1753, size: 608 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.AnalyticsObjects;
const env0_8 = value.UPLOAD_BANNER_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.label = {'color': null, 'alignItems': 'center', 'flexDirection': 'row', color: INTERACTIVE_TEXT_ACTIVE};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.sublabel = {color: TEXT_DEFAULT};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.nitroWheel = {marginLeft: PX_8};
const object3 = {'borderColor': null, 'borderWidth': 1, 'borderRadius': null, 'height': 24, 'minWidth': 24};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.borderColor = INTERACTIVE_TEXT_DEFAULT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.bannerColor = object3;
object2.selectedColor = {'flexDirection': 'row', 'alignItems': 'center'};
object2.selectedColorHex = {textTransform: 'uppercase'};
object2.rowArrow = {'height': 13, 'width': 8, 'marginLeft': 10, 'marginTop': 2};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.upsellButton = {marginTop: PX_8};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.remove = {color: TEXT_FEEDBACK_CRITICAL};
object2.titleWrapper = {flex: 0};
object2.titleContainer = {justifyContent: 'flex-start'};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/ChangeBannerActionSheet.tsx');
exports.default = ChangeBannerActionSheet;
}
function ChangeBannerColorRow({user}) { // fn#100642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:894, offset: 0x021f19b3, size: 747 bytes, params: 2, frame: 29
var object2;
const styles = useStyles();
const {pendingAvatar,
pendingAccentColor} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
function() {
return UserProfileSettingsStore.getPendingChanges();
});
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
image: pendingAvatar});
const value5 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id);
const r11 = pendingAvatarSrc ?? user.getAvatarURL(undefined, 80);
const value7 = (require(8421) /* metro dependency 8421: VideoBackground */).memoizedImageSource(r11);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const rgb2int = colorUtilsModule.rgb2int;
const videoBackgroundModule = require(8421) /* metro dependency 8421: VideoBackground */;
const useDominantColorFromImage = videoBackgroundModule.useDominantColorFromImage;
const value8 = Reflect.apply(rgb2int, colorUtilsModule, [Reflect.apply(useDominantColorFromImage,
videoBackgroundModule, [r11, value7])]);
const r19 = (pendingAccentColor !== undefined ? pendingAccentColor : value5?.primaryColor) ?? value8 ?? 0;
const env0_2 = env0_4.useCallback(_fun100644, [value8]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {};
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = ;
const items2 = [((Component) => )(importDefault(13187) /* metro dependency 13187: ColorBlock */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = {colorUtilsModule.int2hex(r19)};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const CUSTOM = Sizes.CUSTOM;
items2[2] = ;
object2.trailing = {items2};
object2.onPress = onPress_100645;
return ;
}
function ChangeBannerActionSheet({user, analyticsLocations, onBannerChange, removeText, showRemoveBanner, isTryItOut}) { // fn#100646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1896, offset: 0x021f1d24, size: 1166 bytes, params: 2, frame: 47
var r12;
var object15;
showRemoveBanner = !(showRemoveBanner === undefined) && showRemoveBanner;
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const styles = useStyles();
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const r26 = isTryItOut || (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumProfileCustomization(user);
const value5 = _fun100647();
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Vgdusv = t.Vgdusv;
const bottomSheetTitleHeader = )((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)} titleWrapperStyle={styles.titleWrapper} titleContainerStyle={styles.titleContainer} />;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items2 = [r26 ? null : ];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
string = intl.string;
const formLabel = ;
const value13 = !r26;
object.label = {formLabel}{r26 ? value13 : ((NitroWheelIcon) => )((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)};
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const FormSubLabel = (require(7972) /* metro dependency 7972: native */).FormSubLabel;
string = intl.string;
object.subLabel = <>{r26 ? value13 : {((Component) => )(importDefault(13186) /* metro dependency 13186: UserProfileUpsellButton */)}}>;
object.onPress = r26 ? value5 : undefined;
items2[1] = ;
if (showRemoveBanner) {
r12 = } onPress={onPress_100651} />;
} else {
r12 = showRemoveBanner;
}
items2[2] = r12;
return (
{bottomSheetTitleHeader}
{items2}
);
}
function _fun100644(a0) { // fn#100644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1349, offset: 0x021f1cb1, size: 61 bytes, params: 2, frame: 13
let value = a0;
const r4 = value !== env0_0 ? value : null;
value = environment.__proto__;
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({accentColor: r4});
}
function ChangeBannerColorRowOnPress() { // fn#100645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:1851, owner: ChangeBannerColorRow.onPress, offset: 0x021f1cee, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_1,
onSelect: env0_2});
}
function _fun100647() { // fn#100647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:2122, offset: 0x021f21b2, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun100649);
return _fun100650;
}
function ChangeBannerActionSheetOnPress() { // fn#100651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:3363, owner: ChangeBannerActionSheet.onPress, offset: 0x021f2258, size: 51 bytes, params: 1, frame: 12
onBannerChange(null);
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function* _fun100649() { // fn#100649, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13375:2142, offset: 0x021f21e1, size: 119 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_1;
var binding2 = env3_2;
binding(binding2[10]).hideActionSheet();
var value4 = binding(binding2[11]);
yield value4.openImagePicker(env3_8);
value = undefined;
if (false) {
return value;
}
var base64 = value.base64;
if (base64 != null) {
require(base64, environment.__proto__.__proto__.originalMd5);
}
}
}