summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search.js
blob: cda8c16ffc95990c755bee134c68a7a0c1e467e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import * as models from "../base";
/**
 * @public
 * Returns the system image for the given search entity.
 */
export function searchEntitySystemImage(entity) {
    switch (entity) {
        case "developer":
            return "person.crop.square";
        case "story":
            return "appstore";
        case "watch":
            return "applewatch";
        case "arcade":
            return "joystickcontroller.fill";
        default:
            return undefined;
    }
}
/**
 * @public
 * Model representing selectable displayed token for Guided Search
 */
export class GuidedSearchToken extends models.ViewModel {
    constructor(value, isSelected, leadingIcon, displayName, clickAction) {
        super();
        this.value = value;
        this.isSelected = isSelected;
        this.leadingIcon = leadingIcon;
        this.displayName = displayName;
        this.clickAction = clickAction;
    }
}
/**
 * @public
 * Object storing mapping of:
 * Search Term + [Set of Guided Search Tokens] = Optimization Term.
 * I.e. how the search term and token swill be comined for final query term search results are searched for.
 */
export class GuidedSearchQuery extends models.Model {
    constructor(searchTerm, selectedTokens, optimizationTerm) {
        super();
        this.searchTerm = searchTerm;
        this.selectedTokens = selectedTokens;
        this.optimizationTerm = optimizationTerm;
    }
}
//# sourceMappingURL=guided-search.js.map