/**
 * constant js
 *
 * @since 1.4.3.2 & 1.4.3.3
 */
const CONSTANT = {};

CONSTANT.DEVICE_TYPE = {
    WEB: 4,
};
CONSTANT.SORT_TYPE = {
    NAME: 0,
    START_DATE_DESC: 1,
    START_DATE_ASC: 2,
    TYPE: 3,
    LAST_EDIT_DATE: 4,
};

CONSTANT.PAGE_NAME = {
    DASHBOARD: 'dashboard',
    OPERATION_LIST: 'operationList',
    FOOTER: 'main-footer.html',
    DEFAULT: 'index.html',
    LOGIN: './login.html',
};

CONSTANT.PAGE_TAB = {
    DASHBOARD: 'dashboard',
    OPERATION_LIST: 'operationList',
};

CONSTANT.REPORT_TYPE = {
    REPORT: '0',
    ROUTINE: '1',
    ANSWER: '2',
    WORKFLOW: '3',
};

CONSTANT.ADD_REPORT_FLG = {
    UNABLE: '0',
    ABLE: '1',
};

CONSTANT.REPLY_NO = {
    REPORT: '0',
    ANSWER: '1',
};

CONSTANT.URL = {
    CMS: {
        // BASE_CMS: 'https://' + location.host + '/checkapi/web/',
        BASE: 'http://localhost:8080/acms/',
        //BASE: 'https://chatdev2.agentec.jp/acms/',
        API: {
            BASE: '/checkapi/web/',
            ALL_OPERATION_LIST: 'operationListWeb/getOperationList',
            AUTH_SESSION: 'getSession/checkAuthUser',
            OPERATION_VIEW_LOG: 'operationViewLog/saveLog',
            PASSWORD_CHANGE: 'passwordChangeWeb/',
            LOGIN: 'webClientLogin/',
            LOGOUT: 'logoutWeb/',

        },
        HTML: {
            BASE: '/checkapi/web/html/',
            TASK_REPORT_LIST: 'getTaskReport/',
            LIST_REPORT_FORM: 'listReportForm/showReport',
            TASK_LIST: 'taskList',
        },
    },
    WEB: {
        BASE: 'http://127.0.0.1:5500/abweb/html/',
        OPERATION_LIST: 'index',
    },
};

CONSTANT.HTTP_STATUS = {
    FORBIDDEN: '403',
    UNAUTHORIZED: '401',
    OK: '200',
    SERVER_ERROR: '500',
};

CONSTANT.LANG = {
    SAVE_NAME: 'lang',
    JAPAN: 'ja',
    KOREA: 'ko',
    ENGLISH: 'en',
};

CONSTANT.KEYS = {
    userInfo_loginId: 'loginId',
    // Local: UserInfo_Account Path: String
    userInfo_accountPath: 'accountPath',
    // Local: UserInfo_Account Information Storage Flag: Char (Y: Yes, N: No)
    userInfo_rememberLogin: 'rememberLogin',
    // Local: UserInfo_Last login date and time: Datetime
    userInfo_lastLoginTime: 'lastLoginTime',
    // Local: UserInfo_Password Skip Date and Time: Datetime
    userInfo_pwdSkipDt: 'pwdSkipDt',
    // Local: User Options (userOpt)_Video Repeated Flag: Interger (0: No Repeated, 1: Repeated)
    // Session/local:UserInfo_Session ID:String
    userInfo_sid: 'sid',
    userInfo_sid_local: 'sid_local',
    userInfo_sid_preview: 'sidPreview',
    // Session: Enterprise Option (serviceOpt)_Forced password change on first login: Integer (0: None, 1: Urgent, 2: Forced)
    serviceOpt_force_pw_change_on_login: 'force_pw_change_on_login',
    // Session: Enterprise Option (serviceOpt)_Forced password change on periodic login: Integer (0: None, 1: Urgent, 2: Forced)
    serviceOpt_force_pw_change_periodically: 'force_pw_change_periodically',
    // Session: Enterprise Options (serviceOpt)_Using Memo Marking Data Backup: Char (Y: Yes, N: No)
    userInfo_userName: 'userInfo_userName',
    // Local:Session ID: String
    userInfo_sid_bak: 'sid_bak',
    // Session: Notification Information (pushInfo)_Number of new arrivals: Interger
    pushInfo_newMsgNumber: 'pushInfo_newMsgNumber',
    conf_apiUrl: 'conf_apiUrl',
    conf_apiLoginUrl: 'conf_apiLoginUrl',
    conf_checkApiLoginUrl: 'conf_checkApiLoginUrl',
    conf_apiResourceDlUrl: 'conf_apiResourceDlUrl',
    // Session :ABookCheck:Char (Y: Yes, N: No)
    serviceOpt_abook_check: 'abook_check',
    // Session :Chat Function:Char (Y: Yes, N: No)
    serviceOpt_chat_function: 'chat_function',
    // Session: Enterprise Option (serviceOpt)_Any push message: Char (Y: Yes, N: No)
    serviceOpt_usable_push_message: 'usable_push_message',
    // Local
    IsJumpBack: 'IsJumpBack',
    // Local:
    JumpQueue: 'JumpQueue',
};

CONSTANT.MSG_MAP = {
    all: { ja: '全て', ko: '전체', en: 'All' },
    dateError: { ja: '開始日は終了日の前に設定してください。', ko: '잘못된 검색일입니다.', en: 'Please enter correct search date.' },
    operationListTitle: { ja: 'トップページ｜A Book Check', ko: '톱 페이지｜A Book Check', en: 'Top Page｜A Book Check' },
    buttonCategory: { ja: 'カテゴリー', ko: '카테고리', en: 'Category' },
    buttonRefresh: { ja: '更新', ko: '갱신', en: 'Refresh' },
    buttonBack: { ja: '戻る', ko: 'Back', en: 'Back' },
    placeholderOperationName: { ja: '作業名', ko: '작업명', en: 'Working Name' },
    labelPeriod: { ja: '期間', ko: '기간', en: 'Period' },
    labelStartDate: { ja: '開始日', ko: '시작일', en: 'Start date' },
    labelEndDate: { ja: '終了日', ko: '종료일', en: 'End date' },
    placeholderSelect: { ja: '選択', ko: '선택', en: 'Choice' },
    labelSort: { ja: '並び替え', ko: '정렬', en: 'Sort' },
    labelSortName: { ja: '作業名順', ko: '작업명순', en: 'By working name' },
    labelSortNew: { ja: '作業期間が新しい順', ko: '작업기간이 최신순', en: 'By newest period' },
    labelSortOld: { ja: '作業期間が古い順', ko: '작업기간이 오래된순', en: 'By oldest period' },
    labelSortOpen: { ja: '閲覧日が新しい順', ko: '열람순', en: 'By newest viewing date' },
    labelReset: { ja: 'クリア', ko: '클리어', en: 'Clear' },
    headerItemName: { ja: '作業名', ko: '작업명', en: 'Working Name' },
    headerStartDate: { ja: '開始日', ko: '시작일', en: 'Start date' },
    headerEndDate: { ja: '終了日', ko: '종료일', en: 'End date' },
    buttonHome: { ja: 'ホーム', ko: '홈', en: 'Home' },
    buttonSetting: { ja: '設定', ko: '설정', en: 'Setting' },
    buttonOperationList: { ja: '作業一覧', ko: '작업일람', en: 'Operations List' },
    operationListHeaderTitle: { ja: '作業一覧', ko: '작업일람', en: 'Operations List' },
    buttonDashboard: { ja: 'ダッシュボード', ko: '대시보드', en: 'Dashboard' },
    buttonDashboardSetting: { ja: '設定', ko: '설정', en: 'Setting' },
    Processing_w_dot: { ja: '処理中...', ko: '처리중', en: 'Processing...' },
    errorCommunicationFailed: { ja: '通信エラーが発生しました', ko: '통신 오류가 발생했습니다', en: 'A communication error has occurred' },
    errorOccurred: { ja: 'エラーが発生しました', ko: '오류가 발생했습니다', en: 'Error Occurred' },
};
