{
  "id": "sport_pitch",
  "name": {
    "nl": "Sportterrein",
    "fr": "Terrains de sport",
    "en": "Sport pitches",
    "ru": "Спортивные площадки"
  },
  "wayHandling": 1,
  "minzoom": 12,
  "source": {
    "osmTags": {
      "and": [
        "leisure=pitch"
      ]
    }
  },
  "calculatedTags": [
    "_size_classification=Number(feat.properties._surface) < 200 ? 'small' :  (Number(feat.properties._surface) < 750 ? 'medium' : 'large') "
  ],
  "title": {
    "render": {
      "nl": "Sportterrein",
      "fr": "Terrain de sport",
      "en": "Sport pitch",
      "ru": "Спортивная площадка"
    }
  },
  "description": {
    "nl": "Een sportterrein",
    "fr": "Un terrain de sport",
    "en": "A sport pitch"
  },
  "tagRenderings": [
    "images",
    {
      "render": {
        "nl": "Hier kan men {sport} beoefenen",
        "fr": "Ici on joue au {sport}",
        "en": "{sport} is played here"
      },
      "freeform": {
        "key": "sport"
      },
      "question": {
        "nl": "Welke sporten kan men hier beoefenen?",
        "fr": "À quel sport peut-on jouer ici ?",
        "en": "Which sport can be played here?"
      },
      "multiAnswer": true,
      "mappings": [
        {
          "if": {
            "and": [
              "sport=basketball"
            ]
          },
          "then": {
            "nl": "Hier kan men basketbal spelen",
            "fr": "Ici on peut jouer au basket",
            "en": "Basketball is played here"
          }
        },
        {
          "if": {
            "and": [
              "sport=soccer"
            ]
          },
          "then": {
            "nl": "Hier kan men voetbal spelen",
            "fr": "Ici on joue au foot",
            "en": "Soccer is played here"
          }
        },
        {
          "if": {
            "and": [
              "sport=table_tennis"
            ]
          },
          "then": {
            "nl": "Dit is een pingpongtafel",
            "fr": "C'est une table de ping-pong",
            "en": "This is a pingpong table",
            "ru": "Это стол для пинг-понга"
          }
        },
        {
          "if": {
            "and": [
              "sport=tennis"
            ]
          },
          "then": {
            "nl": "Hier kan men tennis spelen",
            "fr": "Ici on peut jouer au tennis",
            "en": "Tennis is played here"
          }
        },
        {
          "if": {
            "and": [
              "sport=korfball"
            ]
          },
          "then": {
            "nl": "Hier kan men korfbal spelen",
            "fr": "Ici on peut jouer au korfbal",
            "en": "Korfball is played here"
          }
        },
        {
          "if": {
            "and": [
              "sport=basket"
            ]
          },
          "then": {
            "nl": "Hier kan men basketbal beoefenen",
            "fr": "Ici on peut jouer au basket",
            "en": "Basketball is played here"
          },
          "hideInAnswer": true
        }
      ]
    },
    {
      "question": {
        "nl": "Wat is de ondergrond van dit sportveld?",
        "fr": "De quelle surface est fait ce terrain de sport ?",
        "en": "Which is the surface of this sport pitch?"
      },
      "render": {
        "nl": "De ondergrond is <b>{surface}</b>",
        "fr": "La surface est <b>{surface}</b>",
        "en": "The surface is <b>{surface}</b>",
        "ru": "Поверхность - <b>{surface}</b>"
      },
      "freeform": {
        "key": "surface"
      },
      "mappings": [
        {
          "if": "surface=grass",
          "then": {
            "nl": "De ondergrond is <b>gras</b>",
            "fr": "La surface est de l'<b>herbe</b>",
            "en": "The surface is <b>grass</b>",
            "ru": "Поверхность - <b>трава</b>"
          }
        },
        {
          "if": "surface=sand",
          "then": {
            "nl": "De ondergrond is <b>zand</b>",
            "fr": "La surface est du <b>sable</b>",
            "en": "The surface is <b>sand</b>",
            "ru": "Поверхность - <b>песок</b>"
          }
        },
        {
          "if": "surface=paving_stones",
          "then": {
            "nl": "De ondergrond bestaat uit <b>stoeptegels</b>",
            "fr": "La surface est des <b>pavés</b>",
            "en": "The surface is <b>paving stones</b>",
            "ru": "Поверхность - <b>брусчатка</b>"
          }
        },
        {
          "if": "surface=asphalt",
          "then": {
            "nl": "De ondergrond is <b>asfalt</b>",
            "fr": "La surface est de l'<b>asphalte</b>",
            "en": "The surface is <b>asphalt</b>",
            "ru": "Поверхность - <b>асфальт</b>"
          }
        },
        {
          "if": "surface=concrete",
          "then": {
            "nl": "De ondergrond is <b>beton</b>",
            "fr": "La surface est du <b>béton</b>",
            "en": "The surface is <b>concrete</b>",
            "ru": "Поверхность - <b>бетон</b>"
          }
        }
      ]
    },
    {
      "question": {
        "nl": "Is dit sportterrein publiek toegankelijk?",
        "fr": "Est-ce que ce terrain de sport est accessible au public ?",
        "en": "Is this sport pitch publicly accessible?"
      },
      "mappings": [
        {
          "if": "access=public",
          "then": {
            "nl": "Publiek toegankelijk",
            "fr": "Accessible au public",
            "en": "Public access"
          }
        },
        {
          "if": "access=limited",
          "then": {
            "nl": "Beperkt toegankelijk (enkel na reservatie, tijdens bepaalde uren, ...)",
            "fr": "Accès limité (par exemple uniquement sur réservation, à certains horaires, ...)",
            "en": "Limited access (e.g. only with an appointment, during certain hours, ...)"
          }
        },
        {
          "if": "access=members",
          "then": {
            "nl": "Enkel toegankelijk voor leden van de bijhorende sportclub",
            "fr": "Accessible uniquement aux membres du club",
            "en": "Only accessible for members of the club"
          }
        },
        {
          "if": "access=private",
          "then": {
            "nl": "Privaat en niet toegankelijk",
            "fr": "Privé - Pas accessible au public",
            "en": "Private - not accessible to the public"
          }
        }
      ]
    },
    {
      "question": {
        "nl": "Moet men reserveren om gebruik te maken van dit sportveld?",
        "fr": "Doit-on réserver pour utiliser ce terrain de sport ?",
        "en": "Does one have to make an appointment to use this sport pitch?"
      },
      "condition": {
        "and": [
          "access!=public",
          "access!=private",
          "access!=members"
        ]
      },
      "mappings": [
        {
          "if": "reservation=required",
          "then": {
            "nl": "Reserveren is verplicht om gebruik te maken van dit sportterrein",
            "fr": "Il est obligatoire de réserver pour utiliser ce terrain de sport",
            "en": "Making an appointment is obligatory to use this sport pitch"
          }
        },
        {
          "if": "reservation=recommended",
          "then": {
            "nl": "Reserveren is sterk aangeraden om gebruik te maken van dit sportterrein",
            "fr": "Il est recommendé de réserver pour utiliser ce terrain de sport",
            "en": "Making an appointment is recommended when using this sport pitch"
          }
        },
        {
          "if": "reservation=yes",
          "then": {
            "nl": "Reserveren is mogelijk, maar geen voorwaarde",
            "fr": "Il est possible de réserver, mais ce n'est pas nécéssaire pour utiliser ce terrain de sport",
            "en": "Making an appointment is possible, but not necessary to use this sport pitch"
          }
        },
        {
          "if": "reservation=no",
          "then": {
            "nl": "Reserveren is niet mogelijk",
            "fr": "On ne peux pas réserver",
            "en": "Making an appointment is not possible"
          }
        }
      ]
    },
    {
      "question": {
        "nl": "Wat is het telefoonnummer van de bevoegde dienst of uitbater?",
        "fr": "Quel est le numéro de téléphone du gérant ?",
        "en": "What is the phone number of the operator?"
      },
      "freeform": {
        "key": "phone",
        "type": "phone"
      },
      "render": "<a href='tel:{phone}'>{phone}</a>"
    },
    {
      "question": {
        "nl": "Wat is het email-adres van de bevoegde dienst of uitbater?",
        "fr": "Quel est l'adresse courriel du gérant ?",
        "en": "What is the email address of the operator?"
      },
      "freeform": {
        "key": "email",
        "type": "email"
      },
      "render": "<a href='mailto:{email}' target='_blank'>{email}</a>"
    },
    {
      "question": {
        "nl": "Wanneer is dit sportveld toegankelijk?",
        "fr": "Quand ce terrain est-il accessible ?",
        "en": "When is this pitch accessible?"
      },
      "render": "Openingsuren: {opening_hours_table()}",
      "freeform": {
        "key": "opening_hours",
        "type": "opening_hours"
      },
      "mappings": [
        {
          "if": "opening_hours=",
          "then": "24/7 toegankelijk",
          "hideInAnswer": true
        },
        {
          "if": "opening_hours=24/7",
          "then": {
            "nl": "24/7 toegankelijk",
            "fr": "Accessible en permanence",
            "en": "Always accessible",
            "ru": "Всегда доступен"
          }
        }
      ],
      "condition": "access~*"
    },
    "questions",
    {
      "render": "{reviews(name, sportpitch)}"
    }
  ],
  "hideUnderlayingFeaturesMinPercentage": 0,
  "icon": {
    "render": "circle:white;./assets/layers/sport_pitch/sport_pitch.svg",
    "mappings": [
      {
        "if": {
          "or": [
            "sport=baseball",
            "sport=basketball",
            "sport=beachvolleyball",
            "sport=boules",
            "sport=skateboard",
            "sport=soccer",
            "sport=table_tennis",
            "sport=tennis",
            "sport=volleyball"
          ]
        },
        "then": "circle:white;./assets/layers/sport_pitch/{sport}.svg"
      }
    ]
  },
  "iconOverlays": [
    {
      "if": {
        "and": [
          "opening_hours!=24/7",
          "opening_hours~*"
        ]
      },
      "then": "isOpen",
      "badge": true
    },
    {
      "if": {
        "or": [
          "access=customers",
          "access=private",
          "access=no"
        ]
      },
      "then": "circle:white;./assets/layers/sport_pitch/lock.svg",
      "badge": true
    }
  ],
  "width": {
    "render": "1"
  },
  "iconSize": {
    "render": "25,25,center",
    "mappings": [
      {
        "if": {
          "or": [
            "_size_classification=medium",
            "id~node/.*"
          ]
        },
        "then": "40,40,center"
      },
      {
        "if": "_size_classification=small",
        "then": "25,25,center"
      },
      {
        "if": "_size_classification=large",
        "then": "50,50,center"
      }
    ]
  },
  "color": {
    "render": "#7cb82f"
  },
  "presets": [
    {
      "title": {
        "nl": "Ping-pong tafel",
        "fr": "Table de ping-pong",
        "en": "Tabletennis table"
      },
      "tags": [
        "leisure=pitch",
        "sport=table_tennis"
      ]
    },
    {
      "title": {
        "nl": "Sportterrein",
        "fr": "Terrain de sport",
        "en": "Sport pitch",
        "ru": "Спортивная площадка"
      },
      "tags": [
        "leisure=pitch",
        "fixme=Toegevoegd met MapComplete, geometry nog uit te tekenen"
      ]
    }
  ]
}