{
  "$jason": {
    "head": {
      "title": "UKNA",
      "actions": {
        "get_location": {
          "type": "$geo.get",
          "options": {
            "distance": "5000"
          },
          "success": {
            "type": "$return.success"
          }
        },
        "refresh_view": {
          "type": "$render",
          "success": {
            "type": "$return.success"
          }
        },
        "location_toast": {
          "type": "$util.toast",
          "options": {
            "text": "Location found.",
            "type": "success"
          },
          "success": {
            "type": "$return.success"
          }
        },
        "location_finding": {
          "type": "$util.toast",
          "options": {
            "text": "Please wait while we find your location.",
            "type": "info"
          },
          "success": {
            "type": "$return.success"
          }
        },
        "$foreground": {
          "action": "$render"
        },
        "$show": {
          "action": "$render"
        },
        "$load": {
          "action": "$render"
        },
        "$pull": {
          "type": "$flush",
          "success": {
            "type": "$reload"
          }
        }
      },
      "styles": {
        "button_style": {
          "align": "center",
          "font": "Courier-Bold",
          "padding": "10",
          "size": "18",
          "background": "#3366cc",
          "color": "#ffffff",
          "height": "80",
          "width": "100%-100"
        },
        "phone_style": {
          "align": "center",
          "font": "Courier-Bold",
          "padding": "10",
          "size": "30",
          "background": "#ffffff",
          "color": "#3366cc",
          "height": "80",
          "width": "100%-100"
        },
        "footer_style": {
          "align": "center",
          "padding": "10",
          "color": "#000000",
          "font": "Courier-Bold",
          "size": "12"
        }
      },
      "data": {
        "b_buttons": [
          {
            "b_text": "0300 999 1212",
            "b_class": "phone_style",
            "b_url": "tel:03009991212",
            "b_view": "app"
          },
          {
            "b_text": "Meeting Search",
            "b_class": "button_style",
            "b_url": "https://ukna.org/meetings/search",
            "b_view": "web"
          },
          {
            "b_text": "Meetings Near Me",
            "b_class": "button_style",
            "b_url": "https://ukna.org/meetings/search/app/{{$jason.coord}}_30",
            "b_view": "location"
          },
          {
            "b_text": "UKNA Website",
            "b_class": "button_style",
            "b_url": "https://ukna.org",
            "b_view": "web"
          },
          {
            "b_text": "Just for Today",
            "b_class": "button_style",
            "b_url": "https://www.jftna.org/jft/",
            "b_view": "web"
          }
        ]
      },
      "templates": {
        "body": {
          "style": {
            "border": "#3366cc",
            "background": "#ffffff"
          },
          "header": {
            "@": "https://app.ukna.org/app.header.json"
          },
          "sections": [
            {
              "items": [
                {
                  "type": "vertical",
                  "style": {
                    "padding": "20",
                    "spacing": "20",
                    "align": "center"
                  },
                  "components": {
                    "{{#each b_buttons}}": {
                      "type": "button",
                      "text": "{{b_text}}",
                      "class": "{{b_class}}",
                      "action": [
                        {
                          "{{#if b_view=='location'}}": {
                            "trigger": "location_finding",
                            "success": {
                              "type": "$geo.get",
                              "options": {
                                "distance": "5000"
                              },
                              "success": {
                                "type": "$href",
                                "options": {
                                  "url": "{{b_url}}",
                                  "view": "web"
                                }
                              }
                            }
                          }
                        },
                        {
                          "{{#else}}": {
                            "type": "$href",
                            "options": {
                              "url": "{{b_url}}",
                              "view": "{{b_view}}"
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                {
                  "@": "https://app.ukna.org/view.footer.json"
                }
              ]
            }
          ]
        }
      }
    }
  }
}