package com.casic.dcms.utils;

import android.Manifest;
import android.graphics.Color;

import com.casic.dcms.R;

import java.util.Arrays;
import java.util.List;

public class Constant {
    public static final String[] USER_PERMISSIONS = {Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS,
            Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO,
            Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.CALL_PHONE, Manifest.permission.READ_PHONE_STATE};
    public static final String[] CASE_PAGE_TITLES = {"待办案卷", "已办案卷"};
    public static final String[] DEPT_PAGE_TITLES = {"待办任务", "待处理", "已办案卷", "部门调整批示", "部门授权审核", "二级缓办待处理", "二级延期待处理"};
    public static final String[] CHART_PAGE_TITLES = {"表格", "饼状图"};
    public static final String[] SPINNER_ITEMS = {"请选择", "已处理", "无需处理"};
    public static final String[] POPUP_LIST_ITEMS = {"一键消警", "报警分布", "窨井列表"};
    public static final String[] POPUP_OPTION_ITEMS = {"一键布防", "一键撤防"};

    public static final List<Integer> ANALYSIS_ICONS = Arrays.asList(
            R.drawable.ic_wtly, R.drawable.ic_ajzt, R.drawable.ic_gfwt,
            R.drawable.ic_jdtj, R.drawable.ic_cltj, R.drawable.ic_qsfx);

    public static final List<String> ANALYSIS_ITEMS = Arrays.asList(
            "问题来源", "案卷状态", "高发问题",
            "街道统计", "处理统计", "趋势分析");

    //先预置8种颜色
    public static final int[] PIE_COLORS = {Color.rgb(28, 197, 220),
            Color.rgb(255, 223, 107), Color.rgb(242, 17, 112),
            Color.rgb(254, 254, 204), Color.rgb(251, 54, 64),
            Color.rgb(216, 248, 183), Color.rgb(129, 178, 20),
            Color.rgb(120, 104, 230)};

    public static final String IP_KEY = "ip";
    static final String USER_BEAN = "userBean";
    static final String BRIDGE_LIST = "projectBridges";
    static final String MAP_CONFIG = "mapConfigs";
    static final String TOILET_LIST = "toilets";

    public static final long HALF_YEAR = 180 * 60 * 60 * 24 * 1000L;
    public static final long ONE_YEAR = 365 * 60 * 60 * 24 * 1000L;
    public static final long FIVE_YEARS = 5L * 365 * 60 * 60 * 24 * 1000L;
    public static final long IMAGE_MINUS_SIZE = 100 * 1024;
    public static final long HTTP_TIMEOUT = 30L;
    public static final int PERMISSIONS_CODE = 999;
    public static final int REQUEST_MAP_CODE = 9001;
    public static final int REQUEST_REFRESH_CODE = 9002;

    public static final int PAGE_LIMIT = 15;
    public static final int BITRATE = 200 * 360 * 30;
    public static final int DEFAULT_WIDTH = 720;
    public static final int DEFAULT_HEIGHT = 1280;

    public static final int CASE_HANDLE = 0;
    public static final int CASE_VERIFY = 1;
    public static final int CASE_CHECK = 2;
    public static final int PUSH_REGISTER = 11;
    public static final int PUSH_MESSAGE_DATA = 12;//透传消息，包含消息的详细数据
    public static final int PUSH_CREATE_NOTIFICATION = 13;
    public static final int LOGIN_OUT = 14;
    public static final int CASE_VERIFY_OK = 15;
    public static final int CASE_CHECK_OK = 16;
    public static final int CASE_HANDLE_OK = 17;
    public static final int CASE_OVERTIME_OK = 18;
    public static final int CASE_URGENT_OK = 19;
    public static final int UPLOAD_LOCATION = 20;
    public static final int MESSAGE_NUMBER = 21;
    public static final int PACKAGE_DONE = 22;
    public static final int DEPT_DONE = 23;
    public static final int CANCEL_ALARM_DONE = 24;

    public static final double DEFAULT_LNG = 116.05695247650146;
    public static final double DEFAULT_LAT = 27.76725390642336;
    public static final double DELTA_LNG_10 = 0.00002536; // 10米范围经度值偏移量（大约）
    public static final double DELTA_LAT_10 = 0.00002256;// 10米范围纬度值偏移量（大约）
    public static final double DELTA_LNG_75 = 0.00075;
    public static final double DELTA_LAT_75 = 0.00075;

    /**
     * 西路社区：116.0497949886485,27.7523090448274
     * 永胜、中山社区：116.04801256908105,27.764489266672403
     * 城北社区：116.05083134025335,27.78274489130171
     * 一木社区：116.06179579161108,27.780238298884917
     * 新街社区：116.0569392645266,27.775902775818285
     * 南道社区：116.05398381594571,27.765387699087427
     * 胜利社区：116.05763011146338,27.758979599138858
     * 黄家社区：116.06998477480374,27.766637205647783
     * 中大社区：116.06510639190675,27.752823008396483
     * 中大、子正社区：116.08546817209574,27.758020310248185
     * 子正、高新区：116.11514568328859,27.774506608946538
     */
    public static final double[] XILU = {116.0497949886485, 27.7523090448274};
    public static final double[] YONG_ZHONG = {116.04801256908105, 27.764489266672403};
    public static final double[] CHENGBEI = {116.05083134025335, 27.78274489130171};
    public static final double[] YIMU = {116.06179579161108, 27.780238298884917};
    public static final double[] XINJIE = {116.0569392645266, 27.775902775818285};
    public static final double[] NANDAO = {116.05398381594571, 27.765387699087427};
    public static final double[] SHENGLI = {116.05763011146338, 27.758979599138858};
    public static final double[] HUANGJIA = {116.06998477480374, 27.766637205647783};
    public static final double[] ZHONGDA = {116.06510639190675, 27.752823008396483};
    public static final double[] ZHONG_ZI = {116.08546817209574, 27.758020310248185};
    public static final double[] ZI_GAO = {116.11514568328859, 27.774506608946538};

    //单独网络请求接口名
    public static final String SHOP_DETAIL = "/shop/merchant/detail?merchantId=";
    public static final String SHOP_PUNISH_LIST = "/shop/punish/listByMerchant?merchantId=";
    public static final String SHOP_PUNISH_TYPE = "/shop/punish/statisticByMerchant?merchantId=";
    public static final String SHOP_MERCHANT_ID = "/shop/merchant/getIdByCode?shopCode=";
    public static final String LIGHT_DETAIL = "/lightCr/overview/lampDetail?lampId=";

    //配置项
    public static final String PROJECT_CONFIG = "http://223.82.47.232:11504/bridge/static/project.config.json";
    public static final String LAYER_CONFIG = "http://111.198.10.15:11404/dcms/static/project.config.json";

    static final String TOILET_SERVICE_URL = "/arcgis/rest/services/crbjfc/FeatureServer";//崇仁公厕特征图层
}
