Switching Icons with AppleScript

Im trying to set up a simple shortcut in BTT which launches/disables stage manager, but i want it to be able to change the icon from squares.leading.rectangle when inactive, and squares.leading.rectangle.fill when active.
Here is my current code:

var BetterTouchTool = Application('BetterTouchTool');
var uuid = "F08F98A0-F7BB-4A5B-965A-C2E6AF9B0C96"
var currIcon = int(BetterTouchTool.get_number_variable("dynamic_isStageManager"))

var icon;
if (currIcon == 0) {
  icon = "squares.leading.rectangle.fill";
} else {
  icon = "squares.leading.rectangle";
}


var updateDefinition = {
          "BTTTouchBarItemSFSymbolDefaultIcon" : icon,

}
BetterTouchTool.update_trigger(uuid, {json: JSON.stringify(updateDefinition)});

Am i missing something? I have the variable set as a javascript dynamic variable in groups and top level triggers. Im rather new to BTT so its very real im missing something completely obvious.

Hey,

can you clarify what kind of button you are trying to update? Then I can post a working example. (BTT has many, e.g. Touch Bar, Menu Bar Status Items, Floating Menus, Stream Deck, Notch Bar...)

Hi, Its a touch bar control strip button