I just tested this with this script: 
void OnStart() {
    SetEntityPlayerInteractCallback("cabinet_nice_1", "Cabinet", false);
}
void Cabinet(string &in asEntity) {
    if(GetSwingDoorState("cabinet_nice_1") == -1) {
    AddDebugMessage("CLOSED", false);
    }
    
    if(GetSwingDoorState("cabinet_nice_1") == 1) {
    AddDebugMessage("OPEN", false);
    }
    
}
I'm not really sure about this myself. But it seemed to work to an extent. I got both debug messages to appear when the cabinet was respectively open/closed. It also seems to work only when both is closed, the "CLOSED" message stopped appearing when I left one side open.