{
  "includeFiles":[
  ],
  "metadata":{
    "amiScriptMethods":[
      "{\n",
      "  \n",
      "}"
    ],
    "customPrefsImportMode":"reject",
    "dm":{
    },
    "fileVersion":3,
    "menubarPosition":"top",
    "rt":{
      "processors":[
      ]
    },
    "stm":{
      "styles":[
        {
          "id":"LAYOUT_DEFAULT",
          "lb":"Layout Default",
          "pt":"DEFAULT"
        }
      ]
    },
    "transientIdPrefix":"TRANSIENT_"
  },
  "portletConfigs":[
    {
      "portletBuilderId":"amidesktop",
      "portletConfig":{
        "amiPanelId":"@DESKTOP",
        "amiStyle":{
          "pt":"LAYOUT_DEFAULT"
        },
        "windows":[
          {
            "header":true,
            "heightDflt":318,
            "hidden":false,
            "leftDflt":73,
            "portlet":"Html1",
            "pos":0,
            "stateDflt":"flt",
            "title":"Calculator",
            "topDflt":100,
            "widthDflt":640,
            "zindexDflt":1
          }
        ]
      }
    },
    {
      "portletBuilderId":"amiform",
      "portletConfig":{
        "amiPanelId":"Html1",
        "amiStyle":{
          "pt":"LAYOUT_DEFAULT",
          "vl":{
            "form":{
              "bgCl":"#2d2d2d"
            }
          }
        },
        "fields":[
          {
            "bgColor":"#707070ff",
            "borderColor":"#b5b4b3",
            "borderRadius":10,
            "borderWidth":3,
            "callbacks":{
              "entries":[
                {
                  "amiscript":[
                    "input.setValue(0);\n",
                    "resultField.setValue(0);"
                  ],
                  "linkedVariables":[
                    {
                      "ari":"FIELD:Html1?input",
                      "varName":"input"
                    },
                    {
                      "ari":"FIELD:Html1?result",
                      "varName":"resultField"
                    }
                  ],
                  "name":"onChange"
                }
              ]
            },
            "fieldFontSize":50,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"C",
            "labelHidden":true,
            "leftPosPx":280,
            "n":"clear",
            "t":"buttonField",
            "topPosPx":120,
            "widthPx":100,
            "zidx":7
          },
          {
            "bgColor":"#707070ff",
            "borderColor":"#b5b4b3",
            "borderRadius":10,
            "borderWidth":3,
            "callbacks":{
              "entries":[
                {
                  "amiscript":[
                    "int userInput = (int)(input.getValue());\n",
                    "int currentResult = (int)(resultField.getValue());\n",
                    "int result = currentResult / userInput;\n",
                    "\n",
                    "resultField.setValue(result);"
                  ],
                  "linkedVariables":[
                    {
                      "ari":"FIELD:Html1?input",
                      "varName":"input"
                    },
                    {
                      "ari":"FIELD:Html1?result",
                      "varName":"resultField"
                    }
                  ],
                  "name":"onChange"
                }
              ]
            },
            "fieldFontSize":50,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"/",
            "labelHidden":true,
            "leftPosPx":400,
            "n":"divide",
            "t":"buttonField",
            "topPosPx":220,
            "widthPx":100,
            "zidx":3
          },
          {
            "bgColor":"#726a6aff",
            "borderColor":"#ffff00",
            "borderRadius":10,
            "borderWidth":2,
            "dme":"0",
            "fieldFontSize":45,
            "fontColor":"#ffffff",
            "heightPx":80,
            "l":"Input:",
            "labelColor":"#ffffff",
            "labelFontSize":48,
            "labelPadding":6,
            "labelSide":0,
            "labelSideAlignment":0,
            "leftPosPx":19,
            "n":"input",
            "t":"textField",
            "topPosPx":220,
            "widthPx":359,
            "zidx":5
          },
          {
            "bgColor":"#707070ff",
            "borderColor":"#b5b4b3",
            "borderRadius":10,
            "borderWidth":3,
            "callbacks":{
              "entries":[
                {
                  "amiscript":[
                    "int userInput = (int)(input.getValue());\n",
                    "int currentResult = (int)(resultField.getValue());\n",
                    "int result = currentResult - userInput;\n",
                    "\n",
                    "resultField.setValue(result);"
                  ],
                  "linkedVariables":[
                    {
                      "ari":"FIELD:Html1?input",
                      "varName":"input"
                    },
                    {
                      "ari":"FIELD:Html1?result",
                      "varName":"resultField"
                    }
                  ],
                  "name":"onChange"
                }
              ]
            },
            "fieldFontSize":50,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"-",
            "labelHidden":true,
            "leftPosPx":520,
            "n":"minus",
            "t":"buttonField",
            "topPosPx":120,
            "widthPx":100,
            "zidx":2
          },
          {
            "bgColor":"#707070ff",
            "borderColor":"#b5b4b3",
            "borderRadius":10,
            "borderWidth":3,
            "fieldFontSize":50,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"x",
            "labelHidden":true,
            "leftPosPx":520,
            "n":"mult",
            "t":"buttonField",
            "topPosPx":220,
            "widthPx":100,
            "zidx":4
          },
          {
            "bgColor":"#707070ff",
            "borderColor":"#b5b4b3",
            "borderRadius":10,
            "borderWidth":3,
            "callbacks":{
              "entries":[
                {
                  "amiscript":[
                    "int userInput = (int)(input.getValue());\n",
                    "int currentResult = (int)(resultField.getValue());\n",
                    "int result = userInput + currentResult;\n",
                    "\n",
                    "resultField.setValue(result);"
                  ],
                  "linkedVariables":[
                    {
                      "ari":"FIELD:Html1?input",
                      "varName":"input"
                    },
                    {
                      "ari":"FIELD:Html1?result",
                      "varName":"resultField"
                    }
                  ],
                  "name":"onChange"
                }
              ]
            },
            "fieldFontSize":50,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"+",
            "labelHidden":true,
            "leftPosPx":400,
            "n":"plus",
            "t":"buttonField",
            "topPosPx":120,
            "widthPx":100,
            "zidx":1
          },
          {
            "bgColor":"#6d6b6bff",
            "borderColor":"#ffff00",
            "borderRadius":10,
            "borderWidth":2,
            "disabled":true,
            "dme":"0",
            "fieldFontSize":45,
            "fontColor":"#ffff00",
            "heightPx":80,
            "l":"",
            "leftPosPx":20,
            "n":"result",
            "t":"textField",
            "topPosPx":20,
            "widthPx":600,
            "zidx":1
          }
        ],
        "snap":20,
        "upid":"Html1"
      }
    }
  ]
}