112 lines
5.5 KiB
TypeScript
112 lines
5.5 KiB
TypeScript
/* Metro module 14627; source: modules/premium/powerups/native/GuildPowerupsWarning.tsx; dependencies: [31, 27, 33, 4501, 697, 14628, 7684, 4573, 2] */
|
|
import UseGuildPowerupsWarningConfig from '../hooks/useGuildPowerupsWarningConfig.tsx'; /* Metro dependency 14628 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun110567(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14824:6, offset: 0x0237d6a5, size: 440 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'flexDirection': 'row', 'alignItems': 'flex-start', 'padding': null, 'backgroundColor': null,
|
|
'borderWidth': 1};
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object2.padding = PX_24;
|
|
const BACKGROUND_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_WARNING;
|
|
object2.backgroundColor = BACKGROUND_FEEDBACK_WARNING;
|
|
const STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING;
|
|
object2.borderColor = STATUS_WARNING;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object2.gap = PX_8;
|
|
object2.overflow = 'hidden';
|
|
object.container = object2;
|
|
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.contentContainer = {'flex': 1, 'gap': null, 'alignItems': 'center', gap: PX_4};
|
|
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.warningText = {marginTop: PX_4};
|
|
object.text = {textAlign: 'center'};
|
|
const env0_6 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsWarning.tsx');
|
|
exports.default = GuildPowerupsWarning;
|
|
function GuildPowerupsWarning({guildId, powerupNames, warnings}) { // fn#110568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14824:680, offset: 0x0237d85d, size: 362 bytes, params: 2, frame: 29
|
|
var r0;
|
|
var items2;
|
|
const Text = (TextModule).Text;
|
|
var text;
|
|
var value;
|
|
const styles = useStyles();
|
|
const {shouldShow, title,
|
|
description} = (UseGuildPowerupsWarningConfig)(guildId,
|
|
powerupNames);
|
|
if (shouldShow) {
|
|
var viewBindingProps = {style: styles.container};
|
|
var viewBindingProps2 = {style: styles.contentContainer};
|
|
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
|
|
value = (
|
|
<CircleErrorIcon
|
|
color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING}
|
|
size="md"
|
|
/>
|
|
);
|
|
items2 = [value];
|
|
text = styles.text;
|
|
items2[1] = (
|
|
<Text
|
|
variant="text-md/semibold"
|
|
color="text-feedback-warning"
|
|
style={text}
|
|
>
|
|
{title}
|
|
</Text>
|
|
);
|
|
text = styles.text;
|
|
items2[2] = (
|
|
<Text variant="text-sm/medium" style={text}>
|
|
{description}
|
|
</Text>
|
|
);
|
|
items2[3] = warnings?.map(_fun110569);
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
<View {...viewBindingProps2}>
|
|
{items2}
|
|
</View>
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
function _fun110569(a0, a1) { // fn#110569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14824:1166, offset: 0x0237d9c7, size: 125 bytes, params: 3, frame: 17
|
|
const Text = (TextModule).Text;
|
|
const stylesBinding = styles;
|
|
return (
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-feedback-warning"
|
|
style={[stylesBinding.warningText, stylesBinding.text]}
|
|
key={'warning-' + a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110567, 14627, [31, 27, 33, 4501, 697, 14628, 7684, 4573,
|
|
2]) /* metro module 14627, dependencies: [31, 27, 33, 4501, 697, 14628, 7684, 4573, 2] */;
|