2026-09-19 06:52:51 +00:00
|
|
|
// Module ID: 8387
|
|
|
|
|
// Function ID: 8388
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: StringSelectActionComponentUtils
|
2026-09-19 06:52:51 +00:00
|
|
|
// Dependencies: [8381, 1978, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getInitialStringSelectOptions
|
|
|
|
|
|
2026-09-19 06:52:51 +00:00
|
|
|
// Module 8387 (StringSelectActionComponentUtils)
|
|
|
|
|
import Server from "Server" /* 1978 */;
|
|
|
|
|
import LocalInteractionComponentStateStore from "LocalInteractionComponentStateStore" /* 8381 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/interaction_components/StringSelectActionComponentUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const getInitialStringSelectOptions = function getInitialStringSelectOptions(selectionActionComponent, containerId) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const interactionComponentState = LocalInteractionComponentStateStore.getInteractionComponentState(containerId, selectionActionComponent.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
let type;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (interactionComponentState != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
type = interactionComponentState.type;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
if (type === Server.ComponentType.STRING_SELECT) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let mapped = interactionComponentState.values;
|
|
|
|
|
} else {
|
|
|
|
|
const options = selectionActionComponent.options;
|
2026-09-10 05:38:07 +00:00
|
|
|
const found = options.filter((item) => item.default);
|
2026-07-20 16:05:17 +00:00
|
|
|
mapped = found.map((value) => value.value);
|
|
|
|
|
}
|
|
|
|
|
return mapped;
|
|
|
|
|
};
|