/* Metro module 15643; source: modules/parent_tools/native/RestrictedHoursModal.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 5461, 1585, 15644, 566, 4017, 4504, 1244, 2224, 6258, 15645, 3868, 4573, 5280, 15646, 5076, 15642, 4571, 10121, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseFormattedEndTime from '../hooks/useFormattedEndTime.tsx'; /* Metro dependency 15644 */
import UseIsInRestrictedHours from '../hooks/useIsInRestrictedHours.tsx'; /* Metro dependency 15646 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ModalScreenNativeModule from '../../../design/components/Modal/native/ModalScreen.native.tsx'; /* Metro dependency 6258 */
import * as ModalNativeModule from '../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */
function _fun119785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:6, offset: 0x025194ba, size: 634 bytes, params: 8, frame: 28
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const PX_24 = (Native).space.PX_24;
object.container = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', paddingHorizontal: PX_24};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['zIndex'] = 0;
object3['backgroundColor'] = 'rgb(0, 3, 40)';
object.backgroundFill = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['zIndex'] = 1;
object.assetLayers = object4;
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object.sunbeamGradient = object5;
object.riveContainer = {'width': '100%', 'maxWidth': 523, 'height': 300};
const PX_16 = (Native).space.PX_16;
object.content = {'alignItems': 'center', 'width': '100%', 'gap': null, 'zIndex': 2, gap: PX_16};
object.description = {textAlign: 'center'};
const PX_32 = (Native).space.PX_32;
object.footer = {'position': 'absolute', 'bottom': null, 'alignSelf': 'center', 'zIndex': 2, bottom: PX_32};
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['zIndex'] = 10;
object9['justifyContent'] = 'center';
object9['alignItems'] = 'center';
object9['backgroundColor'] = 'rgb(0, 3, 40)';
object.logoutBlockingLayer = object9;
const env0_10 = Reflect.apply(createStyles, value, [object]);
object = {MAIN: 'main'};
object = {code: 'function RestrictedHoursModalTsx1(){const{backgroundOpacity}=this.__closure;return{opacity:backgroundOpacity.get()};}'};
object = {code: 'function RestrictedHoursModalTsx2(){const{gradientOpacity}=this.__closure;return{opacity:gradientOpacity.get()};}'};
object = {code: 'function RestrictedHoursModalTsx3(){const{contentOpacity,contentScale}=this.__closure;return{opacity:contentOpacity.get(),transform:[{scale:contentScale.get()}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/RestrictedHoursModal.tsx');
exports.default = RestrictedHoursModal;
function RestrictedHoursLogoutBlockingLayer({visible}) { // fn#119786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:898, offset: 0x02519734, size: 119 bytes, params: 2, frame: 18
const styles = useStyles();
return (
visible
? (
{((ActivityIndicator) => )((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
)
: null
);
}
function RestrictedHoursScreen({onLogin, logoutRequestInFlight}) { // fn#119787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1554, offset: 0x025197ab, size: 1290 bytes, params: 2, frame: 35
const intl = (IndexNativeModule).intl;
const styles = useStyles();
const {top, bottom} = (UseSafeAreaInsetsNative)();
const value3 = (UseFormattedEndTime)();
const value4 = (FluxModule).useStateFromStores([UserStore], _fun119788);
const value5 = (ReanimatedRexportModule).useSharedValue(0);
const value6 = (ReanimatedRexportModule).useSharedValue(0);
const value7 = (ReanimatedRexportModule).useSharedValue(0);
const value8 = (ReanimatedRexportModule).useSharedValue(0.9);
value8.useEffect(_fun119789, [value5, value6, value7, value8]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = RestrictedHoursScreenM;
closure.__closure = {backgroundOpacity: value5};
closure.__workletHash = 17073775693336;
closure.__initData = env0_12;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = RestrictedHoursScreenO;
closure.__closure = {gradientOpacity: value6};
closure.__workletHash = 16592270370139;
closure.__initData = env0_13;
const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = RestrictedHoursScreenZ;
closure.__closure = {contentOpacity: value7, contentScale: value8};
closure.__workletHash = 15616799997783;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const r24 = value3 != null ? intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VfqJvY,
{endTime: value3}) : intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).abikhN);
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
object = {backgroundColor: env0_9};
const View2 = (ReanimatedRexport).View;
const items5 = [styles.container];
items5[1] = {paddingTop: top, paddingBottom: bottom};
items5[2] = value9;
const items2 = [
,
];
const View3 = (ReanimatedRexport).View;
const items3 = [styles.assetLayers, value10];
const Image = (ReanimatedRexport).Image;
items2[1] = (
);
const View4 = (ReanimatedRexport).View;
const items4 = [styles.content, value11];
const TeenScreenTimeRive = (NativeModule).TeenScreenTimeRive;
const view = (
);
const Text = (TextModule).Text;
items2[2] = (
{view}
{r24}
);
items2[3] = (
{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iqeKDz,
{username: value4, loginHook: loginHook_119793})}
);
return (
{items2}
);
function _fun119788() { // fn#119788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1710, offset: 0x02519cb5, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const username = UserStore.getCurrentUser()?.username;
return username ?? '';
}
function _fun119789() { // fn#119789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1925, offset: 0x02519ce6, size: 484 bytes, params: 1, frame: 31
let binding = env0_1;
let set = binding.set;
let withTiming = TimingModule.withTiming;
let object = {duration: 3000};
const Easing = (ReanimatedRexportModule).Easing;
object.easing = Easing.bezier(0.24, 0.27, 0.58, 1);
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [1, object])]);
binding = env0_2;
set = binding.set;
let withDelay = ReanimatedRexportModule.withDelay;
withTiming = TimingModule.withTiming;
object = {duration: 1500};
object.easing = Easing.bezier(0, 0, 1, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [1500, Reflect.apply(withTiming,
TimingModule, [1, object])])]);
binding = Module00057;
set = binding.set;
withDelay = ReanimatedRexportModule.withDelay;
withTiming = TimingModule.withTiming;
object = {duration: 1000};
object.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [2000, Reflect.apply(withTiming, TimingModule,
[1, object])])]);
binding = ReactModule;
set = binding.set;
withDelay = ReanimatedRexportModule.withDelay;
withTiming = TimingModule.withTiming;
object = {duration: 1000};
object.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [2000, Reflect.apply(withTiming, TimingModule, [1,
object])])]);
}
function RestrictedHoursScreenM() { // fn#119790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:2411, owner: RestrictedHoursScreen.M, offset: 0x01c1ea9c, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_1.get();
return object;
}
function RestrictedHoursScreenO() { // fn#119791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:2549, owner: RestrictedHoursScreen.O, offset: 0x0202cb77, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_2.get();
return object;
}
function RestrictedHoursScreenZ() { // fn#119792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:2685, owner: RestrictedHoursScreen.z, offset: 0x0202d22a, size: 56 bytes, params: 1, frame: 11
const object = {};
object.opacity = Module00057.get();
const object2 = {};
object2.scale = ReactModule.get();
object.transform = [object2];
return object;
}
function RestrictedHoursScreenLoginHook(a0, a1) { // fn#119793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3737, owner: RestrictedHoursScreen.loginHook, offset: 0x02519eca, size: 78 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
{a0}
);
}
}
function RestrictedHoursModal() { // fn#119794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3988, offset: 0x02519f18, size: 294 bytes, params: 1, frame: 20
const value2 = (UseIsInRestrictedHours)();
const env0_1 = ReactModule.useRef(false);
const env0_2 = ReactModule.useRef(true);
ReactModule.useEffect(_fun119795, []);
const [property, env0_3] = env0_3Binding(ReactModule.useState(false), 2);
const value6 = RestrictedHoursModalUseScreens(ReactModule.useCallback(_fun119800, []), property);
ReactModule.useEffect(_fun119802, [value2]);
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(function() {
return true;
});
const Modal = (ModalNativeModule).Modal;
const MAIN = env0_11.MAIN;
return ;
function _fun119795() { // fn#119795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4080, offset: 0x0251a03e, size: 26 bytes, params: 1, frame: 2
env0_2.current = true;
return _fun119796;
function _fun119796() { // fn#119796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4098, offset: 0x00e64dab, size: 19 bytes, params: 1, frame: 2
env1_2.current = false;
}
}
function RestrictedHoursModalUseScreens(a0, a1) { // fn#119797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4169, owner: RestrictedHoursModal.useScreens, offset: 0x0251a058, size: 74 bytes, params: 3, frame: 15
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
return (NavigatorNativeModule).useNavigatorScreens(_fun119798, [a0, a1]);
function _fun119798() { // fn#119798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4231, offset: 0x0251a0a2, size: 50 bytes, params: 1, frame: 4
const MAIN = env2_11.MAIN;
return {[MAIN]: {'headerShown': false, 'gestureEnabled': false, render: render_119799}};
function render_119799() { // fn#119799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4287, offset: 0x0251a0d4, size: 44 bytes, params: 1, frame: 14
return ;
}
}
}
function _fun119800() { // fn#119800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4379, offset: 0x0251a100, size: 102 bytes, params: 1, frame: 12
var environment;
var value;
if (!env0_1.current) {
env0_1.current = true;
env0_3(true);
value = environment.__proto__;
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
value = value.logout('restricted_hours');
value.finally(_fun119801);
}
function _fun119801() { // fn#119801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4460, offset: 0x0251a166, size: 42 bytes, params: 1, frame: 11
if (env1_2.current) {
env1_1.current = false;
env1_3(false);
}
}
}
function _fun119802() { // fn#119802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4530, offset: 0x0251a190, size: 61 bytes, params: 1, frame: 11
var value;
if (!(env0_0 || env0_1.current)) {
value = environment.__proto__;
value = require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */;
value.closeRestrictedHoursModal();
}
}
}
}
global.__d(_fun119785, 15643, [57, 31, 27, 1878, 33, 4501, 697, 5461, 1585, 15644, 566, 4017, 4504, 1244, 2224,
6258, 15645, 3868, 4573, 5280, 15646, 5076, 15642, 4571, 10121,
2]) /* metro module 15643, dependencies: [57, 31, 27, 1878, 33, 4501, 697, 5461, 1585, 15644, 566, 4017, 4504, 1244, 2224, 6258, 15645, 3868, 4573, 5280, 15646, 5076, 15642, 4571, 10121, 2] */;