/* Metro module 15981; source: actions/ChangeVanityURLActionCreators.tsx; dependencies: [661, 694, 507, 2] */ import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as HTTPUtilsModule from '../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ function _fun123621(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:6, offset: 0x025957c6, size: 183 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = {openModal: openModal, closeModal: closeModal_123623, removeVanityURL: removeVanityURL, changeVanityURL: changeVanityURL, setVanityURL: setVanityURL}; (FileImportTrackerModule).fileFinishedImporting('actions/ChangeVanityURLActionCreators.tsx'); exports.default = object; function openModal(a0, a1) { // fn#123622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:119, offset: 0x0259587d, size: 63 bytes, params: 3, frame: 13 (Dispatcher).dispatch({type: 'CHANGE_VANITY_URL_MODAL_OPEN', guildId: a0, code: a1}); } function closeModal_123623() { // fn#123623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:208, offset: 0x025958bc, size: 49 bytes, params: 1, frame: 13 (Dispatcher).dispatch({type: 'CHANGE_VANITY_URL_MODAL_CLOSE'}); } function removeVanityURL(a0) { // fn#123624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:295, offset: 0x025958ed, size: 109 bytes, params: 2, frame: 14 const HTTP = (HTTPUtilsModule).HTTP; const patch = HTTP.patch; const object = {}; object.url = Endpoints.GUILD_VANITY_URL(a0); object.body = {code: null}; object.oldFormErrors = true; object.rejectWithError = true; return Reflect.apply(patch, HTTP, [object]).then(_fun123625); function _fun123625() { // fn#123625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:405, offset: 0x0259595a, size: 51 bytes, params: 1, frame: 12 const value = environment.__proto__; (Dispatcher).dispatch({'type': 'GUILD_SETTINGS_SET_VANITY_URL', 'code': null, 'uses': 0}); } } function changeVanityURL(a0, a1) { // fn#123626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:487, offset: 0x0259598d, size: 163 bytes, params: 3, frame: 17 (Dispatcher).dispatch({type: 'CHANGE_VANITY_URL_MODAL_SUBMIT'}); const HTTP = (HTTPUtilsModule).HTTP; const patch = HTTP.patch; object = {}; object.url = Endpoints.GUILD_VANITY_URL(a0); object.body = {code: a1}; object.oldFormErrors = true; object.rejectWithError = true; return Reflect.apply(patch, HTTP, [object]).then(_fun123627, _fun123628); function _fun123627({body}) { // fn#123627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:677, offset: 0x02595a30, size: 94 bytes, params: 2, frame: 15 const code = body.code; const uses = body.uses; let value = environment.__proto__; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses}); env0_0.closeModal(); } function _fun123628(a0) { // fn#123628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:796, offset: 0x02595a8e, size: 65 bytes, params: 2, frame: 13 const value = environment.__proto__; (Dispatcher).dispatch({'type': 'CHANGE_VANITY_URL_MODAL_SUBMIT_FAILURE', 'error': null, 'hasError': true, error: a0.body}); return a0; } } function setVanityURL(a0, a1) { // fn#123629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:910, offset: 0x02595acf, size: 120 bytes, params: 3, frame: 16 const HTTP = (HTTPUtilsModule).HTTP; const patch = HTTP.patch; const object = {}; object.url = Endpoints.GUILD_VANITY_URL(a0); object.body = {code: a1}; object.oldFormErrors = true; object.rejectWithError = false; return Reflect.apply(patch, HTTP, [object]).then(_fun123630, _fun123631); function _fun123630({body}) { // fn#123630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:1021, offset: 0x02595b47, size: 77 bytes, params: 2, frame: 15 const code = body.code; const uses = body.uses; let value = environment.__proto__; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'GUILD_SETTINGS_SET_VANITY_URL', code: code, uses: uses}); } function _fun123631(a0) { // fn#123631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16189:1122, offset: 0x02595a8e, size: 65 bytes, params: 2, frame: 13 const value = environment.__proto__; (Dispatcher).dispatch({'type': 'CHANGE_VANITY_URL_MODAL_SUBMIT_FAILURE', 'error': null, 'hasError': true, error: a0.body}); return a0; } } } global.__d(_fun123621, 15981, [661, 694, 507, 2]) /* metro module 15981, dependencies: [661, 694, 507, 2] */;