{
  "version": "1.1.0",
  "source": {"tool": "figma", "fileId": "sample-ai-native-numeric-exists"},
  "nodes": [
    {"id": "scr_gate", "type": "screen", "name": "Gate", "role": "container", "children": ["cmp_continue"]},
    {"id": "cmp_continue", "type": "component", "name": "Button/Continue", "role": "button", "parentId": "scr_gate"}
  ],
  "extensions": {
    "ai_native": {
      "version": "1.1.0",
      "state": {
        "form": {"initial": {"age": 20, "email": "test@example.com"}},
        "session": {"initial": {"eligible": null}}
      },
      "actions": {
        "act_set_eligible_true": {
          "type": "setState",
          "target": "scr_gate",
          "payload": {"store": "session", "pointer": "/eligible", "mode": "replace", "patch": true}
        },
        "act_set_eligible_false": {
          "type": "setState",
          "target": "scr_gate",
          "payload": {"store": "session", "pointer": "/eligible", "mode": "replace", "patch": false}
        }
      },
      "eventHandlers": [
        {
          "id": "eh_is_adult",
          "on": "click",
          "scope": "cmp_continue",
          "when": {
            "all": [
              {"gte": [{"ref": "/state/form/age"}, 18]},
              {"exists": [{"ref": "/state/form/email"}]}
            ]
          },
          "do": ["act_set_eligible_true"]
        },
        {
          "id": "eh_is_minor",
          "on": "click",
          "scope": "cmp_continue",
          "when": {"lt": [{"ref": "/state/form/age"}, 18]},
          "do": ["act_set_eligible_false"]
        }
      ]
    }
  }
}
