1 | Object.defineProperty(exports, "__esModule", { value: true });
|
2 | var permutations_1 = require("../../variants/permutations");
|
3 | var transform_1 = require("../../route/transform");
|
4 | exports.forkRender = function (operation) {
|
5 | var operations = new Array();
|
6 | for (var _i = 0, _a = operation.routes; _i < _a.length; _i++) {
|
7 | var route = _a[_i];
|
8 | if (operation.variants == null || Object.keys(operation.variants).length === 0) {
|
9 | operations.push({
|
10 | scope: operation,
|
11 | uri: transform_1.routeToUri(route),
|
12 | });
|
13 | continue;
|
14 | }
|
15 | var variants = permutations_1.permutations(operation.variants);
|
16 | for (var _b = 0, _c = Array.from(variants.entries()); _b < _c.length; _b++) {
|
17 | var _d = _c[_b], variant = _d[0], transition = _d[1];
|
18 | operations.push({
|
19 | scope: operation,
|
20 | uri: transform_1.routeToUri(route),
|
21 | variant: variant,
|
22 | transition: transition,
|
23 | });
|
24 | }
|
25 | }
|
26 | return operations;
|
27 | };
|
28 |
|
\ | No newline at end of file |