2026-10-07 22:43:51 +00:00
|
|
|
// Module ID: 7802
|
|
|
|
|
// Function ID: 7803
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: StringSelectActionComponentUtils
|
2026-10-07 22:43:51 +00:00
|
|
|
// Dependencies: [7796, 1985, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
// Exports: getInitialStringSelectOptions
|
|
|
|
|
|
2026-10-07 22:43:51 +00:00
|
|
|
// Module 7802 (StringSelectActionComponentUtils)
|
2026-10-02 13:37:24 +00:00
|
|
|
import Server from "Server" /* 1985 */;
|
2026-10-07 22:43:51 +00:00
|
|
|
import LocalInteractionComponentStateStore from "LocalInteractionComponentStateStore" /* 7796 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
const result = size.fileFinishedImporting("modules/interaction_components/StringSelectActionComponentUtils.tsx");
|
|
|
|
|
|
|
|
|
|
export const getInitialStringSelectOptions = function getInitialStringSelectOptions(selectionActionComponent, containerId) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let mapped;
|
2026-09-18 19:45:33 +00:00
|
|
|
const interactionComponentState = LocalInteractionComponentStateStore.getInteractionComponentState(containerId, selectionActionComponent.id);
|
|
|
|
|
let type;
|
|
|
|
|
if (interactionComponentState != null) {
|
|
|
|
|
type = interactionComponentState.type;
|
|
|
|
|
}
|
|
|
|
|
if (type === Server.ComponentType.STRING_SELECT) {
|
2026-10-01 14:13:23 +00:00
|
|
|
mapped = interactionComponentState.values;
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
2026-09-26 17:57:22 +00:00
|
|
|
const options = selectionActionComponent.options;
|
2026-09-18 19:45:33 +00:00
|
|
|
const found = options.filter((item) => item.default);
|
|
|
|
|
mapped = found.map((value) => value.value);
|
|
|
|
|
}
|
|
|
|
|
return mapped;
|
|
|
|
|
};
|