// Compiled by ClojureScript 0.0-2138
goog.provide('lt.util.ipc');
goog.require('cljs.core');
lt.util.ipc.ipc = require("ipc");
/**
* Delegates to ipc.send which asynchronously sends args to the browser process's channel.
* @param {...*} var_args
*/
lt.util.ipc.send = (function() { 
var send__delegate = function (channel,args){return cljs.core.apply.call(null,lt.util.ipc.ipc.send,channel,cljs.core.clj__GT_js.call(null,args));
};
var send = function (channel,var_args){
var args = null;if (arguments.length > 1) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);} 
return send__delegate.call(this,channel,args);};
send.cljs$lang$maxFixedArity = 1;
send.cljs$lang$applyTo = (function (arglist__14706){
var channel = cljs.core.first(arglist__14706);
var args = cljs.core.rest(arglist__14706);
return send__delegate(channel,args);
});
send.cljs$core$IFn$_invoke$arity$variadic = send__delegate;
return send;
})()
;
/**
* Delegates to ipc.on which defines a callback to fire for the given channel.
*/
lt.util.ipc.on = (function on(channel,cb){return lt.util.ipc.ipc.on(channel,cb);
});
if(cljs.core.truth_((process.env["IPC_DEBUG"])))
{var old_send_14707 = lt.util.ipc.send;var old_on_14708 = lt.util.ipc.on;/**
* @param {...*} var_args
*/
lt.util.ipc.send = (function() { 
var send__delegate = function (args){cljs.core.prn.call(null,"RENDERER->",args);
return cljs.core.apply.call(null,old_send_14707,args);
};
var send = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return send__delegate.call(this,args);};
send.cljs$lang$maxFixedArity = 0;
send.cljs$lang$applyTo = (function (arglist__14709){
var args = cljs.core.seq(arglist__14709);
return send__delegate(args);
});
send.cljs$core$IFn$_invoke$arity$variadic = send__delegate;
return send;
})()
;
lt.util.ipc.on = (function on(channel,cb){return old_on_14708.call(null,channel,(function() { 
var G__14710__delegate = function (args){cljs.core.prn.call(null,"->RENDERER",channel,args);
return cljs.core.apply.call(null,cb,args);
};
var G__14710 = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return G__14710__delegate.call(this,args);};
G__14710.cljs$lang$maxFixedArity = 0;
G__14710.cljs$lang$applyTo = (function (arglist__14711){
var args = cljs.core.seq(arglist__14711);
return G__14710__delegate(args);
});
G__14710.cljs$core$IFn$_invoke$arity$variadic = G__14710__delegate;
return G__14710;
})()
);
});
} else
{}
