153 lines
8.4 KiB
TypeScript
153 lines
8.4 KiB
TypeScript
/* Metro module 12728; source: design/void/SummarizedIconRow/native/SummarizedIconRow.tsx; dependencies: [31, 27, 33, 4501, 697, 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 CreateStylesModule from '../../../components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun97439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:6, offset: 0x021812ce, size: 519 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {container: {'flexDirection': 'row', 'alignItems': 'center'}, iconWrapper: {'alignItems': 'center',
|
|
'justifyContent': 'center'}};
|
|
const object2 = {};
|
|
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.backgroundColor = BACKGROUND_BASE_LOW;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
|
object.overflowSquircleWrap = object2;
|
|
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object.overflowSquircle = {'backgroundColor': null, 'margin': 3, 'paddingHorizontal': 8, 'height': 30,
|
|
'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': 10, backgroundColor: BACKGROUND_BASE_LOWEST};
|
|
const object4 = {'margin': 2, 'paddingHorizontal': 8, 'height': 32, 'alignItems': 'center',
|
|
'justifyContent': 'center'};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
|
|
object.overflowTextOnly = object4;
|
|
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.overflowCircleWrap = {backgroundColor: BACKGROUND_BASE_LOW, borderRadius: 17};
|
|
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object.overflowCircle = {'backgroundColor': null, 'margin': 2, 'paddingHorizontal': 8, 'height': 30,
|
|
'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': 15, backgroundColor: BACKGROUND_BASE_LOWEST};
|
|
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/void/SummarizedIconRow/native/SummarizedIconRow.tsx');
|
|
exports.default = SummarizedIconRow;
|
|
exports.OverflowText = OverflowText;
|
|
exports.OverflowTextSmall = OverflowTextSmall;
|
|
exports.OverflowCircle = OverflowCircle;
|
|
function OverflowSquircle({overflow, style}) { // fn#97440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:989, offset: 0x021814d5, size: 176 bytes, params: 2, frame: 22
|
|
const styles = useStyles();
|
|
const items2 = [styles.overflowSquircleWrap, style];
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={items2}>
|
|
<View style={styles.overflowSquircle}>
|
|
<Text variant="text-xs/medium">
|
|
{'+' + overflow}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function SummarizedIconRow({items, max, renderItem, offsetAmount, iconWrapperStyle, overflowStyle, style, overflowComponent = OverflowSquircle}) { // fn#97441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:1306, offset: 0x02181585, size: 218 bytes, params: 2, frame: 19
|
|
max = max === undefined ? 8 : max;
|
|
const styles = useStyles();
|
|
const Math = global.Math;
|
|
const env0_8 = Math.max(items.length - max, 0);
|
|
return (
|
|
<View style={[styles.container, style]}>
|
|
{items.map(_fun97442)}
|
|
</View>
|
|
);
|
|
function _fun97442(a0, a1) { // fn#97442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:1545, offset: 0x0218165f, size: 261 bytes, params: 3, frame: 23
|
|
if (a1 >= max) {
|
|
return undefined;
|
|
}
|
|
return (
|
|
a1 !== max - 1
|
|
? (
|
|
a0
|
|
? (
|
|
<View
|
|
style={[styles.iconWrapper, iconWrapperStyle, a1 !== 0 ? {marginLeft: offsetAmount} : {}]}
|
|
key={a1}
|
|
>
|
|
{renderItem(a0, a1 === global.Math.min(items.length, max) - 1)}
|
|
</View>
|
|
)
|
|
: null
|
|
)
|
|
: (
|
|
env0_8 > 0
|
|
? ((Component) => <Component style={[{marginLeft: offsetAmount},
|
|
overflowStyle]} overflow={env0_8 + 1} key={a1} />)(env0_6)
|
|
: (
|
|
a0
|
|
? (
|
|
<View
|
|
style={[styles.iconWrapper, iconWrapperStyle,
|
|
a1 !== 0 ? {marginLeft: offsetAmount} : {}]}
|
|
key={a1}
|
|
>
|
|
{renderItem(a0, a1 === global.Math.min(items.length, max) - 1)}
|
|
</View>
|
|
)
|
|
: null
|
|
)
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function OverflowText({overflow, style}) { // fn#97443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:1807, offset: 0x02181764, size: 146 bytes, params: 2, frame: 19
|
|
const styles = useStyles();
|
|
const items2 = [styles.overflowTextOnly, style];
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={items2}>
|
|
<Text variant="text-xs/medium">
|
|
{'+' + overflow}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function OverflowTextSmall({overflow, style}) { // fn#97444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:1994, offset: 0x021817f6, size: 146 bytes, params: 2, frame: 19
|
|
const styles = useStyles();
|
|
const items2 = [styles.overflowTextOnly, style];
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={items2}>
|
|
<Text variant="text-xxs/medium">
|
|
{'+' + overflow}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function OverflowCircle({overflow, style}) { // fn#97445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12918:2184, offset: 0x02181888, size: 176 bytes, params: 2, frame: 22
|
|
const styles = useStyles();
|
|
const items2 = [styles.overflowCircleWrap, style];
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={items2}>
|
|
<View style={styles.overflowCircle}>
|
|
<Text variant="text-xs/medium">
|
|
{'+' + overflow}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97439, 12728, [31, 27, 33, 4501, 697, 4573,
|
|
2]) /* metro module 12728, dependencies: [31, 27, 33, 4501, 697, 4573, 2] */;
|