/* Metro module 14080; source: modules/collectibles/native/DebugLogView.tsx; dependencies: [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573, 2] */
import DevSettingsStore from '../../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun106697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:6, offset: 0x022e7395, size: 382 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
const env0_5 = value.TouchableOpacity;
value = require(5144) /* metro dependency 5144: CollectiblesDebugStore */;
const env0_7 = value.useCollectiblesDebugStore;
const env0_8 = value.addDebugLog;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsxs;
const env0_10 = value.jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {'backgroundColor': '#ff0000', 'paddingHorizontal': 8, 'paddingVertical': 2};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{debugLogContainer: {'backgroundColor': 'rgba(0, 0, 0, 0.8)',
'padding': 10, 'maxHeight': 350, 'width': '100%', 'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0,
'zIndex': 9999, 'borderTopWidth': 1, 'borderTopColor': '#ff0000'}, debugLogHeader: {'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center', 'marginBottom': 5},
debugLogText: {'color': '#00ff00', 'fontSize': 12, 'marginBottom': 2, 'fontFamily': 'monospace'},
clearButton: object2, clearButtonText: {'color': '#ffffff', 'fontSize': 10, 'fontWeight': 'bold'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/DebugLogView.tsx');
exports.default = _default_106698;
function _default_106698() { // fn#106698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:838, offset: 0x022e7513, size: 521 bytes, params: 1, frame: 27
var slice;
var Math;
var max;
var value4;
const Text = (TextModule).Text;
var object2;
var items2;
const value2 = useCollectiblesDebugStore(function(a0) {
return a0.logs;
});
const env0_1 = useCollectiblesDebugStore(function(a0) {
return a0.clearLogs;
});
const styles = useStyles();
const styles2 = styles;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const binding = styles2;
const useEffect = binding.useEffect;
let length = value2.length;
Reflect.apply(useEffect, binding, [_fun106702, [length, value3]]);
if (value3) {
length = value2.length;
if (length === 0) {
return null;
}
slice = value2.slice;
Math = global.Math;
max = Math.max;
length = value2.length;
value4 = Reflect.apply(slice, value2, [Reflect.apply(max, Math, [0, length - 10])]);
var viewBindingProps = {style: styles.debugLogContainer};
var viewBindingProps2 = {style: styles.debugLogHeader};
object2 = {};
copyDataProperties(object2, styles.debugLogText, undefined);
object2['color'] = '#ffffff';
length = value2.length;
items2 = [
{'Debug Log ('}
{length}
{' entries)'}
,
];
items2[1] = (
{'Clear'}
);
return (
{items2}
{value4.map(_fun106704)}
);
}
return null;
function _fun106702() { // fn#106702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:981, offset: 0x022e774b, size: 52 bytes, params: 1, frame: 11
if (env0_0.length === 0 && env0_3) {
value = environment.__proto__;
addDebugLog('Debug log initialized');
}
}
function _default_106698OnPress() { // fn#106703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1344, owner: _default_106698.onPress, offset: 0x00de925a, size: 15 bytes, params: 1, frame: 9
env0_1();
}
function _fun106704(a0, a1) { // fn#106704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14277:1491, offset: 0x022e777f, size: 82 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
{a0}
);
}
}
}
global.__d(_fun106697, 14080, [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573,
2]) /* metro module 14080, dependencies: [31, 27, 4649, 5144, 33, 4501, 697, 566, 4573, 2] */;