package syncserver;

import clojure.lang.*;
import clojure.java.api.Clojure;
import java.io.StringReader;
import java.util.concurrent.Callable;
import java.util.*;

public class UIState {
        
    public static IFn transact, delta;
    
    static {
        IFn require = Clojure.var("clojure.core", "require");
        require.invoke(Clojure.read("syncserver.core"));
        transact = Clojure.var("syncserver.core", "transact");
        delta = Clojure.var("syncserver.core", "delta");
    }
    
    public static Object transact(List tx) {
        return transact.invoke(tx);
    }
    

    public static Object[] delta(Object s) {
        return (Object[]) delta.invoke(s); 
    }

}

@@ -227,18 +227,25 @@
 t, delta
+, debug
 ;%0A
-
     %0A   
@@ -489,24 +489,85 @@
 , %22delta%22);%0A
+        debug = Clojure.var(%22syncserver.core%22, %22set-debug%22);%0A
     %7D%0A    %0A 
@@ -699,24 +699,24 @@
 Object s) %7B%0A
-
         retu
@@ -754,10 +754,84 @@
 %0A    %7D%0A%0A
+    public static void setDebug(Object x) %7B%0A      debug.invoke(x);%0A    %7D%0A%0A
 %7D%0A

allow setting debug mode from java