83 lines
4.7 KiB
TypeScript
83 lines
4.7 KiB
TypeScript
/* Metro module 11378; source: modules/user_profile/native/UserProfileSection.tsx; dependencies: [31, 27, 33, 4501, 697, 3868, 6791, 4000, 7331, 4573, 2] */
|
|
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 NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as UseProfileThemeValuesNativeModule from '../useProfileThemeValues.native.tsx'; /* Metro dependency 6791 */
|
|
|
|
function _fun87225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11564:6, offset: 0x01fb44a5, size: 308 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_3 = value.jsx;
|
|
const env0_4 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object2 = {borderWidth: 1};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object2.borderColor = BORDER_SUBTLE;
|
|
const env0_5 = Reflect.apply(createStyles, value, [{titleContainer: {'flexDirection': 'row', 'marginBottom': 12,
|
|
'justifyContent': 'space-between'}, title: {flexDirection: 'row'}, section: {'marginHorizontal': 12,
|
|
'marginTop': 12, 'marginBottom': 8}, contentContainer: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileSection.tsx');
|
|
exports.default = UserProfileSection;
|
|
function UserProfileSection(a0) { // fn#87226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11564:541, offset: 0x01fb45d9, size: 500 bytes, params: 2, frame: 31
|
|
var r1;
|
|
var moduleValue3;
|
|
const title = a0.title;
|
|
const headerIcon = a0.headerIcon;
|
|
const trailingIcon = a0.trailingIcon;
|
|
const showContainer = a0.showContainer;
|
|
const children = a0.children;
|
|
const style = a0.style;
|
|
const object = {'title': 0, 'headerIcon': 0, 'trailingIcon': 0, 'showContainer': 0, 'children': 0, 'style': 0};
|
|
const value = null;
|
|
silentSetPrototypeOf(object, value, undefined);
|
|
const value2 = copyDataProperties({}, a0, object, undefined);
|
|
const styles = useStyles();
|
|
const {theme, primaryColor} = (NativeModule).useThemeContext();
|
|
const value5 = (UseProfileThemeValuesNativeModule).useProfileThemeValues(theme);
|
|
const object2 = {};
|
|
copyDataProperties(object2, styles.contentContainer, object);
|
|
if (value == primaryColor) {
|
|
r1 = styles.contentContainer.borderColor;
|
|
} else if (value != value5) {
|
|
moduleValue3 = require(4000) /* metro dependency 4000: ColorUtils */;
|
|
r1 = moduleValue3.hexOpacityToRgba((require(7331) /* metro dependency 7331: FormDivider */).DIVIDER_COLORS[theme],
|
|
|
|
value5.dividerOpacity);
|
|
} else {
|
|
r1 = styles.contentContainer.borderColor;
|
|
}
|
|
object2['borderColor'] = r1;
|
|
return (
|
|
<View style={[styles.section, style]} {...value2}>
|
|
{
|
|
value != title
|
|
? (
|
|
<View style={styles.titleContainer}>
|
|
<View style={styles.title}>
|
|
{((Text) => <Text variant="eyebrow" accessibilityRole="header">{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
|
{headerIcon}
|
|
</View>
|
|
{trailingIcon}
|
|
</View>
|
|
)
|
|
: value
|
|
}
|
|
<View style={showContainer ? object2 : value}>
|
|
{children}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun87225, 11378, [31, 27, 33, 4501, 697, 3868, 6791, 4000, 7331, 4573,
|
|
2]) /* metro module 11378, dependencies: [31, 27, 33, 4501, 697, 3868, 6791, 4000, 7331, 4573, 2] */;
|