// Compiled by ClojureScript 1.10.520 {:target :nodejs}
goog.provide('weathergen.settings');
goog.require('cljs.core');
goog.require('cljs.reader');
goog.require('taoensso.timbre');
goog.require('weathergen.filesystem');
weathergen.settings.electron = require("electron");
weathergen.settings.remote = weathergen.settings.electron.remote;
weathergen.settings.app = (function weathergen$settings$app(){
if(cljs.core._EQ_.call(null,undefined,weathergen.settings.remote)){
return weathergen.settings.electron.app;
} else {
return weathergen.settings.remote.app;
}
});
weathergen.settings.app_dir = weathergen.filesystem.path_combine.call(null,weathergen.settings.app.call(null).getPath("appData"),"craigandera.org","VMT");
weathergen.settings.settings_path = weathergen.filesystem.path_combine.call(null,weathergen.settings.app_dir,"settings.edn");
weathergen.settings.load_settings = (function weathergen$settings$load_settings(){
if(cljs.core.truth_(weathergen.filesystem.exists_QMARK_.call(null,weathergen.settings.settings_path))){
return cljs.reader.read_string.call(null,weathergen.filesystem.file_text.call(null,weathergen.settings.settings_path));
} else {
return null;
}
});
