2026-10-01 06:55:13 +00:00
|
|
|
// Module ID: 14745
|
|
|
|
|
// Function ID: 14746
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: QuestHomeSetting
|
2026-10-01 06:55:13 +00:00
|
|
|
// Dependencies: [32, 19, 10884, 5942, 21, 4845, 576, 1485, 4481, 6597, 14746, 14750, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-10-01 06:55:13 +00:00
|
|
|
// Module 14745 (QuestHomeSetting)
|
2026-09-10 05:38:07 +00:00
|
|
|
import nativeDefault from "native" /* 576 */;
|
2026-10-01 06:55:13 +00:00
|
|
|
import _mod4481 from "module_4481" /* 4481 */;
|
|
|
|
|
import useQuestHomeHeaderDefault from "useQuestHomeHeader" /* 14746 */;
|
|
|
|
|
import QuestHomeDefault from "QuestHome" /* 14750 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
|
|
|
import noop from "module_19" /* 19 */;
|
2026-10-01 06:55:13 +00:00
|
|
|
import QuestHomeNavigationStore from "QuestHomeNavigationStore" /* 10884 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
2026-10-01 06:55:13 +00:00
|
|
|
const QuestConstants = fn(5942);
|
2026-09-10 05:38:07 +00:00
|
|
|
({ QuestHomeSortMethods: metroRequire, getQuestHomeFilterOptionItem: closure_7 } = QuestConstants);
|
|
|
|
|
const jsx = fn(21).jsx;
|
2026-10-01 06:55:13 +00:00
|
|
|
const createStyles = fn(4845);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { container: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST } };
|
|
|
|
|
let closure_9 = createStyles.createStyles(obj2);
|
2026-07-20 16:05:17 +00:00
|
|
|
let closure_10 = [];
|
2026-09-10 05:38:07 +00:00
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/quests/native/QuestHomeSetting.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function QuestHomeSetting() {
|
2026-09-10 05:38:07 +00:00
|
|
|
let tmp = closure_9();
|
|
|
|
|
[tmp3, tmp4] = noop.useState(() => {
|
|
|
|
|
let SUGGESTED = QuestHomeNavigationStore.getField("sort");
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == SUGGESTED) {
|
|
|
|
|
SUGGESTED = constants.SUGGESTED;
|
|
|
|
|
} else {
|
|
|
|
|
const _Object = Object;
|
|
|
|
|
const values = Object.values(constants);
|
|
|
|
|
}
|
|
|
|
|
return SUGGESTED;
|
2026-09-10 05:38:07 +00:00
|
|
|
});
|
|
|
|
|
const tmp2 = _slicedToArray(noop.useState(() => {
|
|
|
|
|
let SUGGESTED = QuestHomeNavigationStore.getField("sort");
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == SUGGESTED) {
|
|
|
|
|
SUGGESTED = constants.SUGGESTED;
|
|
|
|
|
} else {
|
|
|
|
|
const _Object = Object;
|
|
|
|
|
const values = Object.values(constants);
|
|
|
|
|
}
|
|
|
|
|
return SUGGESTED;
|
|
|
|
|
}), 2);
|
2026-09-10 05:38:07 +00:00
|
|
|
[tmp6, tmp7] = noop.useState(() => {
|
|
|
|
|
const str = QuestHomeNavigationStore.getField("filter");
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == str) {
|
2026-09-10 05:38:07 +00:00
|
|
|
let found = closure_1_10;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
const parts = str.split(",");
|
2026-09-10 05:38:07 +00:00
|
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
|
|
|
found = mapped.filter((item) => null != item);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (found.length <= 0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
found = closure_1_10;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return found;
|
2026-09-10 05:38:07 +00:00
|
|
|
});
|
|
|
|
|
const effect = noop.useEffect(() => QuestHomeNavigationStore.subscribe((self) => ({ sort: self.sort, filter: self.filter }), (self, self2) => {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (self.sort !== self2.sort) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let SUGGESTED = self.sort;
|
|
|
|
|
if (null == SUGGESTED) {
|
2026-09-10 05:38:07 +00:00
|
|
|
SUGGESTED = constants.SUGGESTED;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
const _Object = Object;
|
2026-09-10 05:38:07 +00:00
|
|
|
const values = Object.values(constants);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
navigation(SUGGESTED);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (self.filter !== self2.filter) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == self.filter) {
|
2026-09-10 05:38:07 +00:00
|
|
|
let found = closure_2_10;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
const parts = str.split(",");
|
2026-09-10 05:38:07 +00:00
|
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
|
|
|
found = mapped.filter((item) => null != item);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (found.length <= 0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
found = closure_2_10;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_1_1(found);
|
|
|
|
|
}
|
2026-10-01 06:55:13 +00:00
|
|
|
}, { equalityFn: _mod4481.shallow, fireImmediately: true }), []);
|
2026-09-10 05:38:07 +00:00
|
|
|
let navigation;
|
|
|
|
|
const tmp5 = _slicedToArray(noop.useState(() => {
|
|
|
|
|
const str = QuestHomeNavigationStore.getField("filter");
|
|
|
|
|
if (null == str) {
|
|
|
|
|
let found = closure_1_10;
|
|
|
|
|
} else {
|
|
|
|
|
const parts = str.split(",");
|
|
|
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
|
|
|
found = mapped.filter((item) => null != item);
|
|
|
|
|
if (found.length <= 0) {
|
|
|
|
|
found = closure_1_10;
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
return found;
|
|
|
|
|
}), 2);
|
2026-09-26 08:31:33 +00:00
|
|
|
navigation = navigation(1485).useNavigation();
|
2026-09-10 05:38:07 +00:00
|
|
|
const tmp10 = _slicedToArray(noop.useState(false), 2);
|
2026-07-29 08:29:29 +00:00
|
|
|
importDefault = tmp10[1];
|
|
|
|
|
const items = [navigation];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect1 = noop.useEffect(() => navigation.addListener("transitionEnd", () => closure_1_1(true)), items);
|
|
|
|
|
const callback = noop.useCallback(() => {
|
|
|
|
|
closure_1(closure_10);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, []);
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect2 = noop.useEffect(() => () => {
|
|
|
|
|
closure_1_1(closure_1_2[9]).close();
|
|
|
|
|
closure_1_5.resetState();
|
2026-07-20 16:05:17 +00:00
|
|
|
}, []);
|
2026-09-10 05:38:07 +00:00
|
|
|
const field = QuestHomeNavigationStore.useField("scrollToQuestId");
|
|
|
|
|
useQuestHomeHeaderDefault({ setSelectedSortMethod: tmp4, setSelectedFilters: tmp7, selectedFilters: tmp6, selectedSortMethod: tmp3 });
|
|
|
|
|
return jsx(QuestHomeDefault, { containerStyle: tmp.container, isNavigationComplete: tmp10[0], scrollToQuestId: field, sortMethod: tmp3, filters: tmp6, onClearFilters: callback });
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|