decord/alpha/source/stores/ChangeVanityURLModalStore.tsx

50 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 18091
// Function ID: 18092
// Name: ChangeVanityURLModalStore
// Dependencies: [1074, 504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 18091 (ChangeVanityURLModalStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
const FormStates = Constants.FormStates;
const errors = {};
2026-07-23 10:11:24 +00:00
let CLOSED = FormStates.CLOSED;
2026-07-29 08:29:29 +00:00
let c5 = null;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class ChangeVanityURLModalStore extends Store {
}
const prototype = ChangeVanityURLModalStore.prototype;
prototype["isOpen"] = function isOpen() {
return CLOSED !== FormStates.CLOSED;
};
prototype["getProps"] = function getProps() {
return { submitting: CLOSED === FormStates.SUBMITTING, errorDetails, errors, guildId, code };
2026-07-29 08:29:29 +00:00
};
ChangeVanityURLModalStore.displayName = "ChangeVanityURLModalStore";
const changeVanityURLModalStore = new ChangeVanityURLModalStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
CHANGE_VANITY_URL_MODAL_OPEN: function handleOpen(arg0) {
CLOSED = FormStates.OPEN;
({ guildId: c0, code: c1 } = arg0);
2026-08-24 06:08:38 +00:00
c5 = null;
2026-07-20 16:05:17 +00:00
},
CHANGE_VANITY_URL_MODAL_SUBMIT: function handleSubmit() {
CLOSED = FormStates.SUBMITTING;
2026-07-20 16:05:17 +00:00
},
CHANGE_VANITY_URL_MODAL_SUBMIT_FAILURE: function handleSubmitFailure(error) {
CLOSED = FormStates.OPEN;
2026-07-20 16:05:17 +00:00
error = error.error;
},
CHANGE_VANITY_URL_MODAL_CLOSE: function handleClose() {
2026-08-24 06:08:38 +00:00
CLOSED = FormStates.CLOSED;
c0 = null;
c1 = null;
c5 = null;
2026-07-20 16:05:17 +00:00
}
});
const result = size.fileFinishedImporting("stores/ChangeVanityURLModalStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default changeVanityURLModalStore;