package ctbrec;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import ctbrec.event.EventHandlerConfiguration;

public class Settings {

    public enum DirectoryStructure {
        FLAT("all recordings in one directory"),
        ONE_PER_MODEL("one directory for each model"),
        ONE_PER_RECORDING("one directory for each recording");

        private String description;
        DirectoryStructure(String description) {
            this.description = description;
        }

        @Override
        public String toString() {
            return description;
        }
    }

    public enum ProxyType {
        DIRECT,
        HTTP,
        SOCKS4,
        SOCKS5
    }

    public String bongacamsBaseUrl = "https://bongacams.com";
    public String bongaPassword = "";
    public String bongaUsername = "";
    public String cam4Password = "";
    public String cam4Username = "";
    public String camsodaPassword = "";
    public String camsodaUsername = "";
    public String chaturbateBaseUrl = "https://chaturbate.com";
    public boolean chooseStreamQuality = false;
    public String colorAccent = "#FFFFFF";
    public String colorBase = "#FFFFFF";
    public int concurrentRecordings = 0;
    public boolean determineResolution = false;
    public List<String> disabledSites = new ArrayList<>();
    public List<EventHandlerConfiguration> eventHandlers = new ArrayList<>();
    public String fc2livePassword = "";
    public String fc2liveUsername = "";
    public String flirt4freePassword;
    public String flirt4freeUsername;
    public boolean generatePlaylist = true;
    public int httpPort = 8080;
    public String httpServer = "localhost";
    public int httpTimeout = 10000;
    public String httpUserAgent = "Mozilla/5.0 Gecko/20100101 Firefox/62.0";
    public String httpUserAgentMobile = "Mozilla/5.0 (Android 9.0; Mobile; rv:63.0) Gecko/63.0 Firefox/63.0";
    public byte[] key = null;
    public String lastDownloadDir = "";
    public String livejasminBaseUrl = "https://www.livejasmin.com";
    public boolean livejasminBetaAcknowledged = false;
    public String livejasminPassword = "";
    public String livejasminUsername = "";
    public boolean livePreviews = false;
    public boolean localRecording = true;
    public int maximumResolution = 0;
    public String mediaPlayer = "/usr/bin/mpv";
    public String mfcBaseUrl = "https://www.myfreecams.com";
    public List<String> mfcDisabledModelsTableColumns = new ArrayList<>();
    public boolean mfcIgnoreUpscaled = false;
    public double[] mfcModelsTableColumnWidths = new double[0];
    public String mfcModelsTableFilter = "";
    public String mfcModelsTableSortColumn = "";
    public String mfcModelsTableSortType = "";
    public String mfcPassword = "";
    public String mfcUsername = "";
    public int minimumLengthInSeconds = 0;
    public long minimumSpaceLeftInBytes = 0;
    public Map<String, String> modelNotes = new HashMap<>();
    public List<Model> models = new ArrayList<>();
    public List<Model> modelsIgnored = new ArrayList<>();
    public int onlineCheckIntervalInSecs = 60;
    public int overviewUpdateIntervalInSecs = 10;
    public String password = ""; // chaturbate password TODO maybe rename this onetime
    public String postProcessing = "";
    public String proxyHost;
    public String proxyPassword;
    public String proxyPort;
    public ProxyType proxyType = ProxyType.DIRECT;
    public String proxyUser;
    public double[] recordedModelsColumnWidths = new double[0];
    public String recordedModelsSortColumn = "";
    public String recordedModelsSortType = "";
    public double[] recordingsColumnWidths = new double[0];
    public String recordingsDir = System.getProperty("user.home") + File.separator + "ctbrec";
    public DirectoryStructure recordingsDirStructure = DirectoryStructure.FLAT;
    public String recordingsSortColumn = "";
    public String recordingsSortType = "";
    public boolean requireAuthentication = false;
    public boolean showPlayerStarting = false;
    public boolean singlePlayer = true;
    public int splitRecordings = 0;
    public String startTab = "Settings";
    public String streamatePassword = "";
    public String streamateUsername = "";
    public int thumbWidth = 180;
    public boolean updateThumbnails = true;
    public String username = ""; // chaturbate username TODO maybe rename this onetime
    public int windowHeight = 800;
    public boolean windowMaximized = false;
    public int windowWidth = 1340;
    public int windowX;
    public int windowY;
}
