1/*
2Copyright 2015 Google Inc. All rights reserved.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17local sours = import 'sours-oo.jsonnet';
18
19local RemoveGarnish = {
20  // Not technically removed, but made hidden.
21  garnish:: super.garnish,
22};
23
24// Make virgin cocktails
25local NoAlcohol = {
26  local Substitute(ingredient) =
27    local k = ingredient.kind;
28    local bitters = 'Angustura Bitters';
29    if k == 'Whiskey' then [
30      { kind: 'Water', qty: ingredient.qty },
31      { kind: bitters, qty: 'tsp' },
32    ] else if k == 'Banks 7 Rum' then [
33      { kind: 'Water', qty: ingredient.qty },
34      { kind: 'Vanilla Essence', qty: 'dash' },
35      { kind: bitters, qty: 'dash' },
36    ] else [
37      ingredient,
38    ],
39  ingredients: std.flattenArrays([
40    Substitute(i)
41    for i in super.ingredients
42  ]),
43};
44
45local PartyMode = {
46  served: 'In a plastic cup',
47};
48
49{
50  'Whiskey Sour':
51    sours['Whiskey Sour']
52    + RemoveGarnish + PartyMode,
53
54  'Virgin Whiskey Sour':
55    sours['Whiskey Sour'] + NoAlcohol,
56
57  'Virgin Daiquiri':
58    sours.Daiquiri + NoAlcohol,
59
60}
61