package seedu.address.commons.core;

import java.util.Objects;
import java.util.logging.Level;

/**
 * Config values used by the app
 */
public class Config {

    public static final String DEFAULT_CONFIG_FILE = "config.json";

    // Config values customizable through config file
    private String appTitle = "Address App";
    private Level logLevel = Level.INFO;
    private String userPrefsFilePath = "preferences.json";
    private String addressBookFilePath = "data/addressbook.xml";
    private String addressBookName = "MyAddressBook";


    public String getAppTitle() {
        return appTitle;
    }

    public void setAppTitle(String appTitle) {
        this.appTitle = appTitle;
    }

    public Level getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(Level logLevel) {
        this.logLevel = logLevel;
    }

    public String getUserPrefsFilePath() {
        return userPrefsFilePath;
    }

    public void setUserPrefsFilePath(String userPrefsFilePath) {
        this.userPrefsFilePath = userPrefsFilePath;
    }

    public String getAddressBookFilePath() {
        return addressBookFilePath;
    }

    public void setAddressBookFilePath(String addressBookFilePath) {
        this.addressBookFilePath = addressBookFilePath;
    }

    public String getAddressBookName() {
        return addressBookName;
    }

    public void setAddressBookName(String addressBookName) {
        this.addressBookName = addressBookName;
    }


    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Config)) { //this handles null as well.
            return false;
        }

        Config o = (Config) other;

        return Objects.equals(appTitle, o.appTitle)
                && Objects.equals(logLevel, o.logLevel)
                && Objects.equals(userPrefsFilePath, o.userPrefsFilePath)
                && Objects.equals(addressBookFilePath, o.addressBookFilePath)
                && Objects.equals(addressBookName, o.addressBookName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appTitle, logLevel, userPrefsFilePath, addressBookFilePath, addressBookName);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("App title : " + appTitle);
        sb.append("\nCurrent log level : " + logLevel);
        sb.append("\nPreference file Location : " + userPrefsFilePath);
        sb.append("\nLocal data file location : " + addressBookFilePath);
        sb.append("\nAddressBook name : " + addressBookName);
        return sb.toString();
    }

}

@@ -307,23 +307,20 @@
 itle = %22
-Address
+Task
  App%22;%0A 
@@ -433,35 +433,35 @@
 vate String 
-addressBook
+taskManager
 FilePath = %22
@@ -506,40 +506,40 @@
 ing 
-addressBookName = %22MyAddressBook
+taskManagerName = %22MyTaskManager
 %22;%0A%0A
@@ -1074,27 +1074,27 @@
 ring get
-AddressBook
+TaskManager
 FilePath
@@ -1113,27 +1113,27 @@
  return 
-addressBook
+taskManager
 FilePath
@@ -1160,27 +1160,27 @@
 void set
-AddressBook
+TaskManager
 FilePath
@@ -1187,27 +1187,27 @@
 (String 
-addressBook
+taskManager
 FilePath
@@ -1227,41 +1227,41 @@
 his.
-addressBookFilePath = addressBook
+taskManagerFilePath = taskManager
 File
@@ -1294,27 +1294,27 @@
 ring get
-AddressBook
+TaskManager
 Name() %7B
@@ -1329,27 +1329,27 @@
  return 
-addressBook
+taskManager
 Name;%0A  
@@ -1372,27 +1372,27 @@
 void set
-AddressBook
+TaskManager
 Name(Str
@@ -1395,27 +1395,27 @@
 (String 
-addressBook
+taskManager
 Name) %7B%0A
@@ -1431,37 +1431,37 @@
 his.
-addressBookName = addressBook
+taskManagerName = taskManager
 Name
@@ -1950,27 +1950,27 @@
 .equals(
-addressBook
+taskManager
 FilePath
@@ -1973,27 +1973,27 @@
 Path, o.
-addressBook
+taskManager
 FilePath
@@ -2032,38 +2032,38 @@
 als(
-addressBookName, o.addressBook
+taskManagerName, o.taskManager
 Name
@@ -2185,40 +2185,40 @@
 th, 
-addressBookFilePath, addressBook
+taskManagerFilePath, taskManager
 Name
@@ -2546,27 +2546,27 @@
 n : %22 + 
-addressBook
+taskManager
 FilePath
@@ -2593,19 +2593,19 @@
 (%22%5Cn
-AddressBook
+TaskManager
  nam
@@ -2616,19 +2616,19 @@
 %22 + 
-addressBook
+taskManager
 Name

Modify Variable and Method names