summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/foundation/runtime/action-provider.js
blob: e0038da245f284eaddb104161819ac81615b259c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { isBaseActionProvider } from "@jet/environment/dispatching";
/**
 * Retrieve an {@linkcode ActionModel} for the given {@linkcode intent} through
 * any registered `IntentController`s that implement `ActionProvider`
 */
export function actionFor(intent, objectGraph, options = {}) {
    const resolvedController = objectGraph.dispatcher.controller(intent);
    if (isBaseActionProvider(resolvedController)) {
        return resolvedController.actionFor(intent, objectGraph, options);
    }
    return null;
}
//# sourceMappingURL=action-provider.js.map