decord/source/modules/interaction_components/StringSelectActionComponentUtils.tsx

29 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 8037
// Function ID: 8038
2026-07-20 16:05:17 +00:00
// Name: getInitialStringSelectOptions
2026-09-02 09:53:35 +00:00
// Dependencies: [8031, 1954, 2]
2026-07-20 16:05:17 +00:00
// Exports: getInitialStringSelectOptions
2026-09-02 09:53:35 +00:00
// Module 8037 (getInitialStringSelectOptions)
import PermissionOverwriteType from "PermissionOverwriteType" /* 1954 */;
import closure_2 from "getInteractionComponentStates" /* 8031 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-23 10:11:24 +00:00
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-08-24 06:08:38 +00:00
if (type === 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;
};