121 lines
6.8 KiB
TypeScript
121 lines
6.8 KiB
TypeScript
/* Metro module 6231; source: design/components/TableRow/native/TableRowGroup.native.tsx; dependencies: [31, 27, 33, 4501, 697, 1357, 4573, 3860, 6232, 6236, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import MobileVisualRefreshExperiment from '../../../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
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 UseTokenModule from '../../../tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as TextModule from '../../Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as TableRowGroupContextNativeModule from './TableRowGroupContext.native.tsx'; /* Metro dependency 6236 */
|
|
|
|
function _fun49234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6409:6, offset: 0x011f2425, size: 379 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const TableRowGroupTitle2 = TableRowGroupTitle;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.Fragment;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.container = {flexShrink: 0};
|
|
const TABLE_ROW_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_BORDER_RADIUS;
|
|
object.content = {'borderRadius': null, 'overflow': 'hidden', 'flexGrow': 1, 'flexShrink': 0, 'padding': 0,
|
|
borderRadius: TABLE_ROW_BORDER_RADIUS};
|
|
object.title = {marginBottom: 8};
|
|
object.description = {marginBottom: 8};
|
|
const object4 = {};
|
|
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
|
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
|
object.hasTrailingText = object4;
|
|
object.helperText = {marginTop: 8};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/TableRow/native/TableRowGroup.native.tsx');
|
|
exports.TableRowGroupTitle = TableRowGroupTitle2;
|
|
exports.TableRowGroup = TableRowGroup;
|
|
function TableRowGroupTitle({title, style, lineClamp}) { // fn#49235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6409:514, offset: 0x011f25a0, size: 170 bytes, params: 2, frame: 20
|
|
const value2 = (MobileVisualRefreshExperiment)('TableRowGroup');
|
|
const styles = useStyles();
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
accessibilityRole="header"
|
|
variant={value2 ? 'text-md/medium' : 'text-sm/semibold'}
|
|
color={value2 ? 'text-subtle' : 'text-default'}
|
|
style={[styles.title, style]}
|
|
lineClamp={lineClamp}
|
|
>
|
|
{title}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function TableRowGroup({children, title, description, helperText, hasIcons, hasTrailingText, accessibilityRole, accessibilityLabel}) { // fn#49236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6409:935, offset: 0x011f264a, size: 507 bytes, params: 2, frame: 32
|
|
hasTrailingText = !(hasTrailingText === undefined) && hasTrailingText;
|
|
accessibilityRole = accessibilityRole === undefined ? 'none' : accessibilityRole;
|
|
const styles = useStyles();
|
|
const useToken = UseTokenModule.useToken;
|
|
const TABLE_ROW_GROUP_HELPER_TEXT_STYLE = (Native).modules.mobile.TABLE_ROW_GROUP_HELPER_TEXT_STYLE;
|
|
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_GROUP_HELPER_TEXT_STYLE]);
|
|
const Children = ReactModule.Children;
|
|
const value3 = Children.map(children, _fun49237);
|
|
const TableRowGroupContext = (TableRowGroupContextNativeModule).TableRowGroupContext;
|
|
const Provider = TableRowGroupContext.Provider;
|
|
const items2 = [
|
|
title != null && <TableRowGroupTitle title={title} />,
|
|
];
|
|
items2[1] = description != null && ((Text) => <Text variant="text-sm/normal" color="text-subtle" style={styles.description}>{description}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
|
hasTrailingText = hasTrailingText ? styles.hasTrailingText : null;
|
|
items2[2] = (
|
|
<View
|
|
style={[styles.content, hasTrailingText]}
|
|
accessibilityRole={accessibilityRole}
|
|
accessibilityLabel={accessibilityLabel}
|
|
>
|
|
{value3}
|
|
</View>
|
|
);
|
|
items2[3] = helperText != null && ((Text) => <Text variant={value2} color="text-muted" style={styles.helperText}>{helperText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
|
return (
|
|
<Provider value>
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
</Provider>
|
|
);
|
|
function _fun49237(a0) { // fn#49237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6409:1199, offset: 0x011f2845, size: 122 bytes, params: 2, frame: 20
|
|
var r1;
|
|
var r0;
|
|
var value4;
|
|
let value = a0;
|
|
const value2 = null;
|
|
if (value2 == value) {
|
|
r0 = value2;
|
|
} else {
|
|
if (env0_1) {
|
|
value4 = environment.__proto__;
|
|
value = (
|
|
<>
|
|
{((TableRowDivider) => <TableRowDivider adjustSpacingForIcon={hasIcons} />)((require(6232) /* metro dependency 6232: TableRowDividerNative */).TableRowDivider)}
|
|
{value}
|
|
</>
|
|
);
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun49234, 6231, [31, 27, 33, 4501, 697, 1357, 4573, 3860, 6232, 6236,
|
|
2]) /* metro module 6231, dependencies: [31, 27, 33, 4501, 697, 1357, 4573, 3860, 6232, 6236, 2] */;
|