/* Metro module 13041; source: modules/rpc/server/commands/setOrientationLockState.tsx; dependencies: [4237, 482, 8079, 694, 8076, 2] */ import CreateRpcJoiSchemaObject from '../../helpers/createRpcJoiSchemaObject.tsx'; /* Metro dependency 8079 */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */ import * as ConstantsModule2 from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */ function _fun99550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:6, offset: 0x021cdb28, size: 180 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const RPCCommands = ConstantsModule.RPCCommands; object = {}; const SET_ORIENTATION_LOCK_STATE = RPCCommands.SET_ORIENTATION_LOCK_STATE; object[SET_ORIENTATION_LOCK_STATE] = {validation: validation_99551, handler: handler_99552}; (FileImportTrackerModule).fileFinishedImporting('modules/rpc/server/commands/setOrientationLockState.tsx'); exports.default = object; function validation_99551(a0) { // fn#99551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:213, offset: 0x021cdbdc, size: 253 bytes, params: 2, frame: 20 var value; const value3 = (CreateRpcJoiSchemaObject)(a0).required(); const keys = value3.keys; const object = {}; const value4 = a0.number(); let valid = value4.valid; let UNLOCKED = OrientationLockState.UNLOCKED; let PORTRAIT = OrientationLockState.PORTRAIT; let LANDSCAPE = OrientationLockState.LANDSCAPE; object.lock_state = Reflect.apply(valid, value4, [UNLOCKED, PORTRAIT, LANDSCAPE]).required(); valid = a0.number().valid; UNLOCKED = OrientationLockState.UNLOCKED; PORTRAIT = OrientationLockState.PORTRAIT; LANDSCAPE = OrientationLockState.LANDSCAPE; value = Reflect.apply(valid, value, [UNLOCKED, PORTRAIT, LANDSCAPE]); value = value.allow(null); object.picture_in_picture_lock_state = value.optional(); valid = a0.number().valid; UNLOCKED = OrientationLockState.UNLOCKED; PORTRAIT = OrientationLockState.PORTRAIT; LANDSCAPE = OrientationLockState.LANDSCAPE; value = Reflect.apply(valid, value, [UNLOCKED, PORTRAIT, LANDSCAPE]); value = value.allow(null); object.grid_lock_state = value.optional(); return Reflect.apply(keys, value3, [object]); } function handler_99552({socket, args}) { // fn#99552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13231:516, offset: 0x021cdcd9, size: 235 bytes, params: 2, frame: 21 const lock_state = args.lock_state; const picture_in_picture_lock_state = args.picture_in_picture_lock_state; const grid_lock_state = args.grid_lock_state; const id = socket.application.id; if (id == null) { throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND}, 'No application.'); } let value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'FRAME_SET_ORIENTATION_LOCK_STATE', applicationId: id, lockState: lock_state, pictureInPictureLockState: picture_in_picture_lock_state}); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'EMBEDDED_ACTIVITY_SET_ORIENTATION_LOCK_STATE', applicationId: id, lockState: lock_state, pictureInPictureLockState: picture_in_picture_lock_state, gridLockState: grid_lock_state}); } } global.__d(_fun99550, 13041, [4237, 482, 8079, 694, 8076, 2]) /* metro module 13041, dependencies: [4237, 482, 8079, 694, 8076, 2] */;