2026-09-29 21:26:22 +00:00
|
|
|
// Module ID: 8420
|
|
|
|
|
// Function ID: 8421
|
2026-09-18 20:18:48 +00:00
|
|
|
// Name: StringSelectActionComponentUtils
|
2026-09-29 21:26:22 +00:00
|
|
|
// Dependencies: [8414, 1978, 2]
|
2026-09-18 20:18:48 +00:00
|
|
|
// Exports: getInitialStringSelectOptions
|
|
|
|
|
|
2026-09-29 21:26:22 +00:00
|
|
|
// Module 8420 (StringSelectActionComponentUtils)
|
|
|
|
|
import Server from "Server" /* 1978 */;
|
|
|
|
|
import LocalInteractionComponentStateStore from "LocalInteractionComponentStateStore" /* 8414 */;
|
2026-09-18 20:18:48 +00:00
|
|
|
|
|
|
|
|
require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/interaction_components/StringSelectActionComponentUtils.tsx");
|
|
|
|
|
|
|
|
|
|
export const getInitialStringSelectOptions = function getInitialStringSelectOptions(selectionActionComponent, containerId) {
|
|
|
|
|
const interactionComponentState = LocalInteractionComponentStateStore.getInteractionComponentState(containerId, selectionActionComponent.id);
|
|
|
|
|
let type;
|
|
|
|
|
if (interactionComponentState != null) {
|
|
|
|
|
type = interactionComponentState.type;
|
|
|
|
|
}
|
|
|
|
|
if (type === Server.ComponentType.STRING_SELECT) {
|
|
|
|
|
let mapped = interactionComponentState.values;
|
|
|
|
|
} else {
|
|
|
|
|
const options = selectionActionComponent.options;
|
|
|
|
|
const found = options.filter((item) => item.default);
|
|
|
|
|
mapped = found.map((value) => value.value);
|
|
|
|
|
}
|
|
|
|
|
return mapped;
|
|
|
|
|
};
|