/**
 * 左侧图层目录 - 完全对照旧代码 leftLayerMenuConfig.js
 *
 * 图层ID分两类:
 * 1. th_*  / anxian* → ArcGIS 要素服务层（mapContent预加载为FeatureLayer/MapImageLayer，勾选=切换visible）
 * 2. oneMap_*       → SuperMap WMTS瓦片层（勾选=动态创建WebTileLayer添加/移除）
 */

// ============ 太湖一张图 ============
const page1 = [
  {
    title: '基础信息',
    layers: [
      { id: 'th_jcys0',     name: '河流',       icon: 'icon-heliu' },
      { id: 'th_jcys1',     name: '湖泊',       icon: 'icon-hubo' },
      { id: 'th_jcys2',     name: '水库',       icon: 'icon-shuiku' },
      { id: 'th_gjjbswz1', name: '水文',       icon: 'icon-shuikushuiwenzhan' },
      { id: 'th_gjjbswz7', name: '水位',       icon: 'icon-shuiweizhan' },
      { id: 'th_gjjbswz8', name: '雨量',       icon: 'icon-yuliangzhan' },
      { id: 'th_dbsqsh0',  name: '取水户',     icon: 'watericon1-quyongshuicezhan' },
      { id: 'th_slfq',     name: '水利分区',   icon: 'icon-hehuqushuikou' },
      { id: 'th_bz',       name: '泵站',       icon: 'icon-bengzhan' },
      { id: 'th_xjb',      name: '橡胶坝',     icon: 'icon-xiangjiaoba' },
      { id: 'th_gq',       name: '灌区',       icon: 'icon-guanqu' },
      { id: 'th_qd',       name: '渠道',       icon: 'icon-qudao' },
      { id: 'th_ydsgc',    name: '引调水工程', icon: 'icon-tangyanbagongcheng' },
    ]
  },
  {
    title: '一湖两河口门',
    layers: [
      { id: 'th_slgc1',  name: '环湖口门',   icon: 'icon-shuishuiyuandi' },
      { id: 'th_slgc2',  name: '太浦河口门', icon: 'icon-shuishuiyuandi' },
      { id: 'th_slgc3',  name: '望虞河口门', icon: 'icon-shuishuiyuandi' },
    ]
  },
  {
    title: '堤防岸段',
    layers: [
      { id: 'th_slgc15', name: '一级堤防',   icon: 'icon-difanggongcheng' },
      { id: 'th_slgc16', name: '二三级堤防', icon: 'icon-difanggongcheng' },
      { id: 'th_slgc17', name: '其他堤防',   icon: 'icon-difanggongcheng' },
    ]
  },
  {
    title: '岸线',
    layers: [
      { id: 'anxian23', name: '太湖岸线',       icon: 'icon-hubo' },
      { id: 'anxian27', name: '太湖岛屿岸线',   icon: 'icon-hubo' },
      { id: 'anxian24', name: '淀山湖',         icon: 'icon-hubo' },
      { id: 'anxian25', name: '太浦河',         icon: 'icon-hubo' },
      { id: 'anxian26', name: '望虞河',         icon: 'icon-hubo' },
    ]
  },
  {
    title: '项目',
    layers: [
      { id: 'shGraphicLayer', name: '涉河项目', icon: 'icon-shuilishiyedanwei' },
    ]
  },
  {
    title: '省内河流(1000k㎡以上)和湖泊(1k㎡以上)',
    layers: [
      { id: 'js', name: '江苏省' },
      { id: 'zj', name: '浙江省' },
      { id: 'sh', name: '上海市' },
      { id: 'ah', name: '安徽省' },
      { id: 'fj', name: '福建省' },
    ]
  }
]

// ============ 专题数据 (WMTS) ============
const page2 = [
  {
    title: '国家基础数据',
    layers: [
      { id: 'oneMap_xzqh', name: '行政区划', url: '/iserver/services/XZQH_HZZR/wmts100?k=CF36000BBA2E31E84B100C0C4C3694C6', tileMatrixSet: 'Custom_XZQH_HZZR' },
    ]
  },
  {
    title: '水利基础数据',
    layers: [
      { id: 'oneMap_hl',     name: '河流',         url: '/iserver/services/RIVER_R/wmts100?k=D0068B86A8FF78D4595A3001B2848723', tileMatrixSet: 'Custom_RIVER_R' },
      { id: 'oneMap_hp',     name: '湖泊',         url: '/iserver/services/LAKE_R/wmts100?k=AAF9C677F714D313589876081DB07AD7', tileMatrixSet: 'Custom_LAKE_R' },
      { id: 'oneMap_lyfq',   name: '流域分区',     url: '/iserver/services/BAS_R/wmts100?k=43590F1B5DFD1EC8806DE79E2EBF0E50', tileMatrixSet: 'Custom_BAS_R' },
      { id: 'oneMap_sk',     name: '水库',         url: '/iserver/services/RSWB_R/wmts100?k=AA43929573DEE529ED8A853448B01C4F', tileMatrixSet: 'Custom_RSWB_R' },
      { id: 'oneMap_swz',    name: '观测站',       url: '/iserver/services/OBS_R/wmts100?k=D5BA1A4825371A32E57DEE6E2B0EFDB4', tileMatrixSet: 'Custom_OBS_R' },
      { id: 'oneMap_sz',     name: '水闸',         url: '/iserver/services/GATE_R/wmts100?k=6C58317ED2F2E1D931E0EEC73B17166B', tileMatrixSet: 'Custom_GATE_R' },
      { id: 'oneMap_bz',     name: '泵站',         url: '/iserver/services/PUMP_R/wmts100?k=3C45E2ECF47A9D2854B05179D45EA731', tileMatrixSet: 'Custom_PUMP_R' },
      { id: 'oneMap_df',     name: '堤防',         url: '/iserver/services/DIKE_R/wmts100?k=3B635F40A7B2A7C951B30BEFB8EB66F1', tileMatrixSet: 'Custom_DIKE_R' },
      { id: 'oneMap_qd',     name: '渠道',         url: '/iserver/services/CH_R/wmts100?k=31B770B196607102AB792D0355703BB5', tileMatrixSet: 'Custom_CH_R' },
      { id: 'oneMap_xjb',    name: '橡胶坝',       url: '/iserver/services/RUB_R/wmts100?k=28B2DE3EA2B7F19E9D19C90AE01D2275', tileMatrixSet: 'Custom_RUB_R' },
      { id: 'oneMap_ydb',    name: '淤地坝',       url: '/iserver/services/SD_R/wmts100?k=C0634C8983D83D6C826F7E9BAB3A5BFD', tileMatrixSet: 'Custom_SD_R' },
      { id: 'oneMap_ncgsgc', name: '农村供水工程', url: '/iserver/services/CWS_R/wmts100?k=B7E567F7BAA2D6290162457556CE164C', tileMatrixSet: 'Custom_CWS_R' },
      { id: 'oneMap_gq',     name: '灌区',         url: '/iserver/services/IRR_R/wmts100?k=B4D108DD49C72FA872169540952B71D8', tileMatrixSet: 'Custom_IRR_R' },
      { id: 'oneMap_sdz',    name: '水电站',       url: '/iserver/services/HYPO_R/wmts100?k=48D0C9EB71602144508B0A0B1457BE18', tileMatrixSet: 'Custom_HYPO_R' },
      { id: 'oneMap_ydsgc',  name: '引调水工程',   url: '/iserver/services/DITR_R/wmts100?k=A51B0F16A82DFE1207D036AA097610ED', tileMatrixSet: 'Custom_DITR_R' },
    ]
  },
  {
    title: '水资源业务专题',
    layers: [
      { id: 'oneMap_szyfq',    name: '水资源分区',     url: '/iserver/services/WRZ_R/wmts100?k=6BD4BA8E4303F3B7C373FECD1C87DA04', tileMatrixSet: 'Custom_WRZ_R' },
      { id: 'oneMap_qysh',     name: '取用水户',       url: '/iserver/services/WIU_R/wmts100?k=3D5E9872F3964CACE4A2211B3C779CE8', tileMatrixSet: 'Custom_WIU_R' },
      { id: 'oneMap_qyscz',    name: '取用水测站',     url: '/iserver/services/WIUST_R/wmts100?k=EB991CE7C53ABBFCA0CC3B3D89D7C8C4', tileMatrixSet: 'Custom_WIUST_R' },
      { id: 'oneMap_dbssyd',   name: '地表水水源地',   url: '/iserver/services/SUWS_R/wmts100?k=316B3101D13C495A916309D93BD092E5', tileMatrixSet: 'Custom_SUWS_R' },
      { id: 'oneMap_sgnqh',    name: '水功能区划',     url: '/iserver/services/WFZ_R/wmts100?k=A2F853E3E3F2B018D2782B0073FB9A21', tileMatrixSet: 'Custom_WFZ_R' },
      { id: 'oneMap_sgnqjcdm', name: '水功能区监测断面', url: '/iserver/services/WFZB_5T_R/wmts100?k=8E228FC0771A0796C49B9F6764064159', tileMatrixSet: 'Custom_WFZB_5T_R' },
      { id: 'oneMap_dxsqsj',   name: '地下水取水井',   url: '/iserver/services/WELL_R/wmts100?k=2354ED0BA5ADFFF50FD3B156D50C6EC2', tileMatrixSet: 'Custom_WELL_R' },
      { id: 'oneMap_sdz',      name: '水电站',         url: '/iserver/services/HYPO_R/wmts100?k=48D0C9EB71602144508B0A0B1457BE18', tileMatrixSet: 'Custom_HYPO_R' },
    ]
  },
  {
    title: '水利单位',
    layers: [
      { id: 'oneMap_sszzjg',   name: '涉水组织机构',   url: '/iserver/services/CORP_R/wmts100?k=0773DB0845A281A1E42BCA47A359E8C1', tileMatrixSet: 'Custom_CORP_R' },
      { id: 'oneMap_slxzjg',   name: '水利行政机关',   url: '/iserver/services/OFLP_R/wmts100?k=A6422E9087AB728EA337E0F6ACD7765B', tileMatrixSet: 'Custom_OFLP_R' },
      { id: 'oneMap_slqy',     name: '水利企业',       url: '/iserver/services/ENLP_R/wmts100?k=06008AAA85DC5040A993C4F8D24D7015', tileMatrixSet: 'Custom_ENLP_R' },
      { id: 'oneMap_slshtt',   name: '水利社会团体',   url: '/iserver/services/COLP_R/wmts100?k=AE0D62E9E68CFEEA60469BD765743CEF', tileMatrixSet: 'Custom_COLP_R' },
      { id: 'oneMap_slsydw',   name: '水利事业单位',   url: '/iserver/services/INLP_R/wmts100?k=79571A8D03A7FB8EA09168617BA8C94C', tileMatrixSet: 'Custom_INLP_R' },
      { id: 'oneMap_xzslgldw', name: '乡镇水利管理单位', url: '/iserver/services/UNORTOWN_R/wmts100?k=95DE238C7DE44D12E4D41B5E12D0AEFC', tileMatrixSet: 'Custom_UNORTOWN_R' },
    ]
  }
]

export const layerGroups = [
  { tab: '太湖一张图', categories: page1 },
  { tab: '专题数据', categories: page2 }
]

export default layerGroups
