"Has extra elements to easily input when a POI is opened.",
newTitle("Helper arguments"),
newTable(
["name","doc"],
[
[
"options",
newCombine([
"A JSON-object of type `{ prefix: string, postfix: string }`. ",
newTable(
["subarg","doc"],
[
[
"prefix",
"Piece of text that will always be added to the front of the generated opening hours. If the OSM-data does not start with this, it will fail to parse.",
],
[
"postfix",
"Piece of text that will always be added to the end of the generated opening hours",
],
]
),
]),
],
]
),
newTitle("Example usage"),
"To add a conditional (based on time) access restriction:\n\n```\n"+
`
"freeform":{
"key":"access:conditional",
"type":"opening_hours",
"helperArgs":[
{
"prefix":"no @ (",
"postfix":")"
}
]
}` +
"\n```\n\n*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`",