bash – Assigning variable with name taken from function argument looks correct but fails

i’m trying to figure out what’s wrong with this piece of code.
To avoid too many variable names and declarations, i’m trying to pass the variable to use with the function argument, that will need to retrieve the value from an associative array like this:

function "VALUE"

function function {
...
var=$1
if (( ${FOO_DICT($FOOKEY)+_} )); then
        if (( $var == "VALUE" )) || (( $var = "VALUE2" )); then
                ${var}="${FOO_DICT(${FOOKEY})}"
                printf "Choosen value: %sn" "${!var}"
...
}

When executing, I get the following error message, and I’m stuck at wondering what exactly is wrong with it:

./script.sh: line 57: VALUE=desiredvalue: command not found

The sintax looks exactly what I need, but seems like is not treating it as a variable assignment but as a command.
(line 57 is ${var}="${FOO_DICT(${FOOKEY})})

Any suggestion on what I’m getting wrong in this?
Thank you 🙂