{
  "version": "1.1.0",
  "source": {
    "tool": "figma",
    "fileId": "sample-form-ai-native"
  },
  "nodes": [
    {
      "id": "scr_signup",
      "type": "screen",
      "name": "Signup",
      "children": ["cnt_form"],
      "role": "container"
    },
    {
      "id": "cnt_form",
      "type": "container",
      "name": "Form",
      "parentId": "scr_signup",
      "children": ["cmp_email", "cmp_submit"],
      "layout": {
        "type": "stack",
        "direction": "column",
        "gap": "{space.3}"
      }
    },
    {
      "id": "cmp_email",
      "type": "component",
      "name": "Input/Email",
      "role": "input",
      "parentId": "cnt_form"
    },
    {
      "id": "cmp_submit",
      "type": "component",
      "name": "Button/SignUp",
      "role": "button",
      "parentId": "cnt_form"
    }
  ],
  "extensions": {
    "ai_native": {
      "version": "1.1.0",
      "intent": {
        "cmp_submit": "trigger main user action",
        "cmp_email": "collect user email input"
      },
      "flows": {
        "signup": {
          "steps": ["cmp_email", "cmp_submit", "@showResult"]
        }
      },
      "stateMachine": {
        "cmp_submit": {
          "default": ["hover", "focus", "disabled"],
          "hover": ["active", "default"],
          "disabled": []
        }
      },
      "constraints": [
        {
          "scope": "cmp_submit",
          "if": {"intent": "danger"},
          "then": {"confirmationRequired": true}
        },
        {
          "scope": "cmp_email",
          "if": {"required": true},
          "then": {"mustValidateEmailFormat": true}
        }
      ],
      "contextRoles": {
        "cmp_submit": ["form.submit"],
        "cmp_email": ["form.input"]
      },
      "dataBindings": [
        {"component": "cmp_email", "source": "user.email"}
      ],
      "confidence": {
        "componentClassification": 0.82,
        "layoutInference": 0.7
      }
    }
  }
}
