decord/alpha/source/modules/threads/useGetThreadDraftSettings.tsx

139 lines
4.3 KiB
TypeScript
Raw Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 9695
// Function ID: 9696
2026-07-20 16:05:17 +00:00
// Name: useGetThreadDraftSettings
2026-10-12 06:59:38 +00:00
// Dependencies: [7244, 558, 576, 11, 504, 2]
2026-07-20 16:05:17 +00:00
2026-10-12 06:59:38 +00:00
// Module 9695 (useGetThreadDraftSettings)
import SnowflakeUtilsDefault from "SnowflakeUtils" /* 11 */;
2026-10-12 06:59:38 +00:00
import DraftStore from "DraftStore" /* 7244 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useGetThreadDraftSettings(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp6;
_require = arg0;
const tmp = _require;
let tmp2 = dependencyMap;
let obj = require("react");
const cResult = obj.c(3);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [DraftStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function l() {
let tmp2 = null;
if (null != closure_0) {
let threadSettings = DraftStore.getThreadSettings(tmp);
const tmp3 = DraftStore;
if (threadSettings == null) {
const getThreadDraftWithParentMessageId = tmp3.getThreadDraftWithParentMessageId;
const obj = SnowflakeUtilsDefault;
threadSettings = getThreadDraftWithParentMessageId(obj.castChannelIdAsMessageId(tmp));
}
tmp2 = threadSettings;
}
return tmp2;
};
cResult[1] = arg0;
cResult[2] = fn;
tmp6 = fn;
} else {
tmp6 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp6);
2026-10-08 09:57:35 +00:00
}) : (function useGetThreadDraftSettings(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
2026-10-03 08:58:59 +00:00
let obj = require("get initialized");
const items = [DraftStore];
2026-10-03 08:58:59 +00:00
return obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
let tmp2 = null;
2026-07-23 10:11:24 +00:00
if (null != closure_0) {
let threadSettings = DraftStore.getThreadSettings(tmp);
2026-10-03 08:58:59 +00:00
const tmp3 = DraftStore;
2026-07-29 08:29:29 +00:00
if (threadSettings == null) {
2026-10-03 08:58:59 +00:00
const getThreadDraftWithParentMessageId = tmp3.getThreadDraftWithParentMessageId;
const obj = SnowflakeUtilsDefault;
threadSettings = getThreadDraftWithParentMessageId(obj.castChannelIdAsMessageId(tmp));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = threadSettings;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
});
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useHasThreadDraft(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp6;
_require = arg0;
2026-10-03 08:58:59 +00:00
const tmp = _require;
let tmp2 = dependencyMap;
let obj = require("react");
const cResult = obj.c(3);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [DraftStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function l() {
let tmp2 = null != closure_0;
if (tmp2) {
let threadSettings = DraftStore.getThreadSettings(tmp);
const tmp3 = DraftStore;
if (threadSettings == null) {
const getThreadDraftWithParentMessageId = tmp3.getThreadDraftWithParentMessageId;
const obj = SnowflakeUtilsDefault;
threadSettings = getThreadDraftWithParentMessageId(obj.castChannelIdAsMessageId(tmp));
}
tmp2 = null != threadSettings;
}
return tmp2;
};
cResult[1] = arg0;
cResult[2] = fn;
tmp6 = fn;
} else {
tmp6 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp6);
2026-10-08 09:57:35 +00:00
}) : (function useHasThreadDraft(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
let obj = require("get initialized");
const items = [DraftStore];
2026-10-03 08:58:59 +00:00
return obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != closure_0;
if (tmp2) {
let threadSettings = DraftStore.getThreadSettings(tmp);
2026-10-03 08:58:59 +00:00
const tmp3 = DraftStore;
2026-07-29 08:29:29 +00:00
if (threadSettings == null) {
2026-10-03 08:58:59 +00:00
const getThreadDraftWithParentMessageId = tmp3.getThreadDraftWithParentMessageId;
const obj = SnowflakeUtilsDefault;
threadSettings = getThreadDraftWithParentMessageId(obj.castChannelIdAsMessageId(tmp));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = null != threadSettings;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
});
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/threads/useGetThreadDraftSettings.tsx");
export default tmp2;
export const useHasThreadDraft = tmp3;