Files
discord-decomp/sources/by-id/module-09068.jsx
T
2026-07-27 16:20:00 +03:00

86 lines
4.3 KiB
React

/* Metro module 9068; source: unknown; dependencies: [31, 27, 33, 9069, 9073] */
function _fun70858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:6, offset: 0x01d0b3fb, size: 223 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_2 = value2.Appearance;
value2.Platform;
value2.Text;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(9069) /* metro dependency 9069 */).DatePickerAndroid;
const getTitle_70863 = function({title, mode}) {
return title === null ? '' : title || (mode !== 'time' ? 'Select date' : 'Select time');
};
exports.default = value.memo(DatePickerWrapper);
}
function getTheme_70859(a0) { // fn#70859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:224, offset: 0x01d0b4da, size: 63 bytes, params: 2, frame: 11
if (a0.theme) {
return a0.theme;
}
var colorScheme;
if (Appearance) {
colorScheme = Appearance.getColorScheme();
return colorScheme === null ? undefined : colorScheme;
}
return 'auto';
}
function getDividerColor(a0) { // fn#70860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:343, offset: 0x01d0b519, size: 65 bytes, params: 2, frame: 13
if (a0.dividerColor) {
return a0.dividerColor;
}
const getTheme_70859Binding = getTheme_70859;
const value = undefined;
const theme_70859Binding = getTheme_70859Binding(a0);
return theme_70859Binding === 'dark' ? 'white' : theme_70859Binding !== 'light' ? value : 'black';
}
function getTextColor(a0) { // fn#70861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:477, offset: 0x01d0b55a, size: 48 bytes, params: 2, frame: 12
const getTheme_70859Binding = getTheme_70859;
const value = undefined;
const theme_70859Binding = getTheme_70859Binding(a0);
return theme_70859Binding === 'dark' ? 'white' : theme_70859Binding !== 'light' ? value : 'black';
}
function getButtonColor(a0) { // fn#70862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:568, offset: 0x01d0b58a, size: 65 bytes, params: 2, frame: 13
if (a0.buttonColor) {
return a0.buttonColor;
}
const getTheme_70859Binding = getTheme_70859;
const value = undefined;
const theme_70859Binding = getTheme_70859Binding(a0);
return theme_70859Binding === 'dark' ? 'white' : theme_70859Binding !== 'light' ? value : 'black';
}
function DatePickerWrapper(a0) { // fn#70864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9253:817, offset: 0x01d0b601, size: 323 bytes, params: 2, frame: 24
const Object = global.Object;
const assign = Object.assign;
const object2 = {};
const moduleValue = require(9073) /* metro dependency 9073 */;
object2.textColor = moduleValue.colorToHex(getTextColor(a0));
const moduleValue2 = moduleValue;
object2.dividerColor = moduleValue2.colorToHex(getDividerColor(a0));
const moduleValue3 = moduleValue;
object2.buttonColor = moduleValue3.colorToHex(getButtonColor(a0));
object2.theme = getTheme_70859(a0);
object2.title = getTitle_70863(a0);
let confirmText = a0.confirmText;
confirmText = confirmText ? a0.confirmText : 'Confirm';
object2.confirmText = confirmText;
let cancelText = a0.cancelText;
cancelText = cancelText ? a0.cancelText : 'Cancel';
object2.cancelText = cancelText;
let minuteInterval = a0.minuteInterval;
minuteInterval = minuteInterval ? a0.minuteInterval : 1;
object2.minuteInterval = minuteInterval;
let mode = a0.mode;
mode = mode ? a0.mode : 'datetime';
object2.mode = mode;
object2.timeZoneOffsetInMinutes = a0.timeZoneOffsetInMinutes == null ? '' : a0.timeZoneOffsetInMinutes.toString();
return <DatePickerAndroid {...Reflect.apply(assign, Object, [{}, a0, object2])} />;
}