104 lines
5.5 KiB
TypeScript
104 lines
5.5 KiB
TypeScript
/* Metro module 11958; source: modules/chat/native/placeholder/ChatPlaceholderRow.tsx; dependencies: [31, 27, 33, 1305, 4501, 697, 11957, 9671, 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 '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as GetChatPlaceholderRowHeightModule from './getChatPlaceholderRowHeight.tsx'; /* Metro dependency 11957 */
|
|
|
|
function _fun91753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12144:6, offset: 0x02070c52, size: 519 bytes, params: 8, frame: 26
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
|
|
const AvatarSizes = (NativeModule).AvatarSizes;
|
|
const NORMAL = AvatarSizes.NORMAL;
|
|
const property = AVATAR_SIZE_MAP[NORMAL];
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object2.paddingLeft = PX_12;
|
|
const CHAT_PLACEHOLDER_ROW_MARGIN_TOP = (GetChatPlaceholderRowHeightModule).CHAT_PLACEHOLDER_ROW_MARGIN_TOP;
|
|
object2.paddingTop = CHAT_PLACEHOLDER_ROW_MARGIN_TOP;
|
|
object2.flexDirection = 'row';
|
|
object.row = object2;
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.rowInner = {marginHorizontal: PX_12, flex: 1};
|
|
const object4 = {};
|
|
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object4.height = property;
|
|
object4.width = property;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object.placeholderAvatar = object4;
|
|
const object5 = {};
|
|
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object5.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
const CHAT_PLACEHOLDER_ROW_LINE_HEIGHT = (GetChatPlaceholderRowHeightModule).CHAT_PLACEHOLDER_ROW_LINE_HEIGHT;
|
|
object5.height = CHAT_PLACEHOLDER_ROW_LINE_HEIGHT;
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.placeholderText = object5;
|
|
const CHAT_PLACEHOLDER_ROW_LINE_MARGIN_TOP = (GetChatPlaceholderRowHeightModule).CHAT_PLACEHOLDER_ROW_LINE_MARGIN_TOP;
|
|
object.placeholderBody = {marginTop: CHAT_PLACEHOLDER_ROW_LINE_MARGIN_TOP, width: '100%'};
|
|
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(ChatPlaceholderRow);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/chat/native/placeholder/ChatPlaceholderRow.tsx');
|
|
exports.default = value;
|
|
function ChatPlaceholderRow({lines}) { // fn#91754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12144:762, offset: 0x02070e59, size: 400 bytes, params: 2, frame: 30
|
|
var r1;
|
|
var defaultImport;
|
|
var value7;
|
|
var push;
|
|
var jsxRuntimeEnv0_3Binding;
|
|
var placeholderText;
|
|
var placeholderBody;
|
|
var value8;
|
|
const styles = useStyles();
|
|
let Math = global.Math;
|
|
let floor = Math.floor;
|
|
const Math2 = global.Math;
|
|
const value3 = Reflect.apply(floor, Math, [10 * Math2.random()]);
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
const Math3 = global.Math;
|
|
const value5 = Reflect.apply(floor, Math, [50 * Math3.random()]) + 10;
|
|
const items2 = [];
|
|
if (0 < lines) {
|
|
for (r1 = 0; true; r1 = value8) {
|
|
defaultImport = importDefault(9671) /* metro dependency 9671: getChatPlaceholderRowWidth */;
|
|
value7 = defaultImport(value3 + r1);
|
|
push = items2.push;
|
|
jsxRuntimeEnv0_3Binding = jsxRuntimeEnv0_3;
|
|
placeholderText = styles.placeholderText;
|
|
placeholderBody = styles.placeholderBody;
|
|
Reflect.apply(push, items2, [<View style={[placeholderText, placeholderBody,
|
|
{width: '' + value7 + '%'}]} key={r1} />]);
|
|
value8 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (!(value8 < lines)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const items3 = [
|
|
<View style={styles.placeholderAvatar} />,
|
|
];
|
|
items3[1] = (
|
|
<View style={styles.rowInner}>
|
|
<View style={[styles.placeholderText, {width: '' + value5 + '%'}]} />
|
|
{items2}
|
|
</View>
|
|
);
|
|
return (
|
|
<View style={styles.row}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91753, 11958, [31, 27, 33, 1305, 4501, 697, 11957, 9671,
|
|
2]) /* metro module 11958, dependencies: [31, 27, 33, 1305, 4501, 697, 11957, 9671, 2] */;
|