On-click and trigger animation c#

I’m a complete noob at this, but I’m hoping that the solution to my problem is relatively simple.

I’m trying to make it so when you move close to the dog (within the trigger) it plays the “excited” animation on loop, and when you click on it, it plays the “jump” animation once. The rest of the time it should be playing the “idle” animation.

Here is my attempt, which comes up with a whole bunch of errors…

using UnityEngine;
using System.Collections;
 
public class Animatedog : MonoBehaviour
{
 
    static Animator anim;
void Update ()
{
 
    if(Input.GetMouseButtonDown)
    {
            anim.SetTrigger("Jump");
    }
       
    else if (OnTriggerStay (Collider other))
    {
        anim.SetTrigger("Excited");
    }
 
    else
    {
        anim.Play("Idle");
    }
}
}

Please help!

Need to add 0,1 or 2
in
if(Input.GetMouseButtonDown(0)) {
}