decord/source/modules/interaction_components/StringSelectActionComponentUtils.tsx

28 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 7903
// Function ID: 7904
2026-07-20 16:05:17 +00:00
// Name: getInitialStringSelectOptions
2026-07-31 08:44:05 +00:00
// Dependencies: [7897, 1906, 2]
2026-07-20 16:05:17 +00:00
// Exports: getInitialStringSelectOptions
2026-07-31 08:44:05 +00:00
// Module 7903 (getInitialStringSelectOptions)
2026-07-29 08:29:29 +00:00
import getInteractionComponentStates from "getInteractionComponentStates";
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("set").fileFinishedImporting("modules/interaction_components/StringSelectActionComponentUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getInitialStringSelectOptions = function getInitialStringSelectOptions(selectionActionComponent, containerId) {
2026-07-23 10:11:24 +00:00
interactionComponentState = interactionComponentState.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-07-29 08:29:29 +00:00
if (type === require(1906) /* PermissionOverwriteType */.ComponentType.STRING_SELECT) {
2026-07-20 16:05:17 +00:00
let mapped = interactionComponentState.values;
} else {
const options = selectionActionComponent.options;
const found = options.filter((arg0) => arg0.default);
mapped = found.map((value) => value.value);
}
return mapped;
};