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); 
    }

}

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, debug;
    
    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");
        debug = Clojure.var("syncserver.core", "set-debug");
    }
    
    public static Object transact(List tx) {
        return transact.invoke(tx);
    }
    

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

    public static void setDebug(Object x) {
      debug.invoke(x);
    }

}

allow setting debug mode from java