81 lines
4.6 KiB
TypeScript
81 lines
4.6 KiB
TypeScript
/* Metro module 10246; source: modules/user_profile/native/UserProfileActivityTimebar.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1357, 10247, 4573, 2] */
|
|
import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
import UseActivityTimer from '../hooks/useActivityTimer.tsx'; /* Metro dependency 10247 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun79578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10432:6, offset: 0x01e58c65, size: 373 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object2.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object2.height = 4;
|
|
object2.marginBottom = 4;
|
|
object.bar = object2;
|
|
const object3 = {};
|
|
const ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND;
|
|
object3.backgroundColor = ACTIVITY_TIMEBAR_PROGRESS_BACKGROUND;
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object3.height = '100%';
|
|
object3.minWidth = 4;
|
|
object.progress = object3;
|
|
object.textRow = {'flexDirection': 'row', 'justifyContent': 'space-between'};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileActivityTimebar.tsx');
|
|
exports.default = UserProfileActivityTimebar;
|
|
function UserProfileActivityTimebar({start, end, style}) { // fn#79579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10432:597, offset: 0x01e58dda, size: 481 bytes, params: 2, frame: 30
|
|
const value3 = (MobileVisualRefreshExperiment)('UserProfileActivityTimebar');
|
|
const styles = useStyles();
|
|
const {elapsed, duration,
|
|
percentage} = (UseActivityTimer)({start: start, end: end});
|
|
const r11 = value3 ? undefined : {fontFamily: Fonts.CODE_NORMAL};
|
|
const view = (
|
|
<View style={styles.bar}>
|
|
<View style={[styles.progress, {width: 100 * percentage + '%'}]} />
|
|
</View>
|
|
);
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={style}>
|
|
{view}
|
|
<View style={styles.textRow}>
|
|
<Text
|
|
variant="text-xs/normal"
|
|
style={r11}
|
|
tabularNumbers={value3 || undefined}
|
|
color={value3 ? 'text-subtle' : undefined}
|
|
>
|
|
{(require(10247) /* metro dependency 10247: useActivityTimer */).formatTime(elapsed)}
|
|
</Text>
|
|
<Text
|
|
variant="text-xs/normal"
|
|
style={r11}
|
|
tabularNumbers={value3 || undefined}
|
|
color={value3 ? 'text-subtle' : undefined}
|
|
>
|
|
{(require(10247) /* metro dependency 10247: useActivityTimer */).formatTime(duration)}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79578, 10246, [31, 27, 661, 33, 4501, 697, 1357, 10247, 4573,
|
|
2]) /* metro module 10246, dependencies: [31, 27, 661, 33, 4501, 697, 1357, 10247, 4573, 2] */;
|