121 lines
7.0 KiB
TypeScript
121 lines
7.0 KiB
TypeScript
/* Metro module 13638; source: modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx; dependencies: [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244, 2] */
|
|
import UseCountdown from '../../../../hooks/useCountdown.tsx'; /* Metro dependency 7054 */
|
|
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
|
|
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun104141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:6, offset: 0x02287abf, size: 373 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 = {};
|
|
const object2 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.paddingTop = PX_16;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object2.gap = PX_24;
|
|
object.heading = object2;
|
|
const object3 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object3.paddingBottom = PX_32;
|
|
object.container = object3;
|
|
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx');
|
|
exports.default = QuestEnrollmentBlockedBottomSheetConnected;
|
|
function QuestEnrollmentBlockedBottomSheet({questEnrollmentBlockedUntil}) { // fn#104142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:474, offset: 0x02287c34, size: 541 bytes, params: 2, frame: 36
|
|
var r2;
|
|
var r0;
|
|
var date;
|
|
var BottomSheet;
|
|
var object2;
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var formatToPlainString;
|
|
var property;
|
|
var object;
|
|
const styles = useStyles();
|
|
const defaultImport = UseCountdown;
|
|
if (questEnrollmentBlockedUntil != null) {
|
|
r2 = questEnrollmentBlockedUntil;
|
|
} else {
|
|
date = new global.Date();
|
|
}
|
|
const {hours, minutes, seconds} = defaultImport(r2);
|
|
let String = global.String;
|
|
const value7 = String(hours).padStart(2, '0');
|
|
String = global.String;
|
|
const value9 = String(minutes).padStart(2, '0');
|
|
String = global.String;
|
|
if (questEnrollmentBlockedUntil == null) {
|
|
r0 = null;
|
|
} else {
|
|
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
var bottomSheetProps = {'header': null, 'footer': null, 'startExpanded': true,
|
|
header: <View style={styles.heading}><Text variant="heading-xl/bold">{intl.string(t['XEHDT/'])}</Text></View>};
|
|
var viewBindingProps2 = {style: styles.container};
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property = t['+5XVH+'];
|
|
object = {};
|
|
object.countdownString = '' + value7 + ':' + value9 + ':' + String(seconds).padStart(2, '0');
|
|
r0 = (
|
|
<BottomSheet {...bottomSheetProps}>
|
|
<View {...viewBindingProps2}>
|
|
<Text variant="text-md/normal">
|
|
{Reflect.apply(formatToPlainString, intl, [property, object])}
|
|
</Text>
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function QuestEnrollmentBlockedBottomSheetConnected({questId, questEnrollmentBlockedUntil, questContentPosition, sourceQuestContent}) { // fn#104143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1244, offset: 0x02287e51, size: 207 bytes, params: 2, frame: 21
|
|
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
|
return QuestStore.getQuest(questId);
|
|
});
|
|
if (quest == null) {
|
|
return null;
|
|
} else {
|
|
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
|
return (
|
|
<QuestContentImpressionTrackerNative
|
|
overrideVisibility
|
|
questOrQuests={quest}
|
|
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_ENROLLMENT_BLOCKED_BOTTOM_SHEET}
|
|
questContentPosition={questContentPosition}
|
|
sourceQuestContent={sourceQuestContent}
|
|
>
|
|
{children_104145}
|
|
</QuestContentImpressionTrackerNative>
|
|
);
|
|
}
|
|
function QuestEnrollmentBlockedBottomSheetConnectedChildren() { // fn#104145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1671, owner: QuestEnrollmentBlockedBottomSheetConnected.children, offset: 0x02287f3b, size: 53 bytes, params: 1, frame: 14
|
|
return (
|
|
<QuestEnrollmentBlockedBottomSheet
|
|
questId={questId}
|
|
questEnrollmentBlockedUntil={questEnrollmentBlockedUntil}
|
|
sourceQuestContent={sourceQuestContent}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun104141, 13638, [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244,
|
|
2]) /* metro module 13638, dependencies: [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244, 2] */;
|