const state = {
    snapshot: '0',
    store_local: false,
    formdata_local: {
        storeFormat: 'xml',
        storePath: '',
        encoding: 'utf-8'
    },
    store_trs: false,
    formdata_trs: {
        dbName: 'trs',
        host: '',
        port: '',
        username: 'system',
        password: '',
        database: ''
    },
    store_mysql: false,
    formdata_mysql: {
        dbName: 'mysql',
        driver: 'com.mysql.cj.jdbc.Driver',
        host: '',
        port: '',
        username: '',
        password: '',
        database: '',
        newDatabase: ''
    },
    store_mssql: false,
    formdata_mssql: {
        dbName: 'mssql',
        driver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
        host: '',
        port: '',
        username: '',
        password: '',
        database: '',
        newDatabase: ''
    },
    store_oracle: false,
    formdata_oracle: {
        dbName: 'oracle',
        driver: 'oracle.jdbc.driver.OracleDriver',
        host: '',
        port: '',
        username: '',
        password: '',
        database: ''
    },
    store_es: false,
    formdata_es: {
        dbName: 'es',
        host: '',
        port: '',
        database: '',
        username: '',
        password: ''
    },
    classify: false,
    similarityButton: false,
    similarity: '80',
    autoAbstractAndKeyword: false,
    keywordsCount: '8',
    abstractProp: '10',
    abstractLength: '200',
    abstractCount: '5',
    proxyDefaultHost: '',
    proxyDefaultPort: '',
    proxyDefaultAccount: '',
    proxyDefaultPassword: '',
    proxyPoolUrl: '',
    alarmEmail: '',
    alarmTime: '',
    alarmRange: '',
    alarmButton: false
}
const mutations = {
    updateSnapshot(state, value) {
        state.snapshot = value
    },
    updateStoreLocal(state, value) {
        state.store_local = value
    },
    updateLocalCode(state, value) {
        state.formdata_local.code = value
    },
    updateStoreTrs(state, value) {
        state.store_trs = value
    },
    updateStoreMysql(state, value) {
        state.store_mysql = value
    },
    updateStoreEs(state, value) {
        state.store_es = value
    },
    updateStoreMssql(state, value) {
        state.store_mssql = value
    },
    updateStoreOracle(state, value) {
        state.store_oracle = value
    },
    updateClassify(state, value) {
        state.classify = value
    },
    updateSimilarityButton(state, value) {
        state.similarityButton = value
    },
    updateSimilarity(state, value) {
        state.similarity = value
    },
    updateAutoAbstractAndKeyword(state, value) {
        state.autoAbstractAndKeyword = value
    },
    updateKeywordsCount(state, value) {
        state.keywordsCount = value
    },
    updateAbstractProp(state, value) {
        state.abstractProp = value
    },
    updateAbstractLength(state, value) {
        state.abstractLength = value
    },
    updateAbstractCount(state, value) {
        state.abstractCount = value
    },
    updateProxyDefaultHost(state, value) {
        state.proxyDefaultHost = value
    },
    updateProxyDefaultPort(state, value) {
        state.proxyDefaultPort = value
    },
    updateProxyDefaultAccount(state, value) {
        state.proxyDefaultAccount = value
    },
    updateProxyDefaultPassword(state, value) {
        state.proxyDefaultPassword = value
    },
    updateProxyPoolUrl(state, value){
        state.proxyPoolUrl = value;
    },
    updateAlarmEmail(state, value) {
        state.alarmEmail = value
    },
    updateAlarmTime(state, value) {
        state.alarmTime = value
    },
    updateAlarmRange(state, value) {
        state.alarmRange = value
    },
    updateAlarmButton(state, value) {
        state.alarmButton = value
    }
}
const actions = {}
export default {
    namespaced: true,
    state,
    actions,
    mutations
}