28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
// Module ID: 7960
|
|
// Function ID: 7961
|
|
// Name: getInitialStringSelectOptions
|
|
// Dependencies: [7954, 1955, 2]
|
|
// Exports: getInitialStringSelectOptions
|
|
|
|
// Module 7960 (getInitialStringSelectOptions)
|
|
import PermissionOverwriteType from "PermissionOverwriteType" /* 1955 */;
|
|
import closure_2 from "getInteractionComponentStates" /* 7954 */;
|
|
|
|
require = arg1;
|
|
const result = require("set").fileFinishedImporting("modules/interaction_components/StringSelectActionComponentUtils.tsx");
|
|
|
|
export const getInitialStringSelectOptions = function getInitialStringSelectOptions(selectionActionComponent, containerId) {
|
|
interactionComponentState = interactionComponentState.getInteractionComponentState(containerId, selectionActionComponent.id);
|
|
let type;
|
|
if (interactionComponentState != null) {
|
|
type = interactionComponentState.type;
|
|
}
|
|
if (type === PermissionOverwriteType.ComponentType.STRING_SELECT) {
|
|
let mapped = interactionComponentState.values;
|
|
} else {
|
|
const options = selectionActionComponent.options;
|
|
const found = options.filter((arg0) => arg0.default);
|
|
mapped = found.map((value) => value.value);
|
|
}
|
|
return mapped;
|
|
};
|