export type MenuNode = {
  id: string
  title: string
  type: 'group' | 'page'
  path?: string         // type=page 必填
  children?: MenuNode[] // type=group 必填
}

export const settingSubSiderMenu: MenuNode[] = [
  { id: 'system_setting_group', title: '系统设置', type: 'group', children: [
      { id: 'setting_system_config', title: '系统配置', type: 'page', path: '/pages/mall/admin/setting/system/config' }
    ]
  },
  { id: 'setting_message_index', title: '消息管理', type: 'page', path: '/pages/mall/admin/setting/message' },
  { id: 'setting_protocol_index', title: '协议设置', type: 'page', path: '/pages/mall/admin/setting/agreement' },
  { id: 'setting_ticket_index', title: '小票配置', type: 'page', path: '/pages/mall/admin/setting/ticket' },
  { id: 'auth_group', title: '管理权限', type: 'group', children: [
      { id: 'setting_auth_admin', title: '管理员管理', type: 'page', path: '/pages/mall/admin/setting/auth/admin' },
      { id: 'setting_auth_role', title: '角色管理', type: 'page', path: '/pages/mall/admin/setting/auth/role' },
      { id: 'setting_auth_menu', title: '菜单管理', type: 'page', path: '/pages/mall/admin/setting/auth/permission' }
    ]
  },
  { id: 'delivery_group', title: '发货设置', type: 'group', children: [
      { id: 'setting_delivery_courier', title: '配送员管理', type: 'page', path: '/pages/mall/admin/setting/delivery/staff' },
      { id: 'pickup_order_group', title: '提货点设置', type: 'group', children: [
          { id: 'setting_delivery_pickup_list', title: '提货点', type: 'page', path: '/pages/mall/admin/setting/delivery/station' },
          { id: 'setting_delivery_verifier', title: '核销员', type: 'page', path: '/pages/mall/admin/setting/delivery/verifier' },
          { id: 'setting_delivery_freight', title: '运费模板', type: 'page', path: '/pages/mall/admin/setting/delivery/template' }
      ]}
    ]
  },
  { id: 'api_group', title: '接口配置', type: 'group', children: [
      { id: 'yh_tong_group', title: '一号通', type: 'group', children: [
          { id: 'setting_api_yht_page', title: '一号通页面', type: 'page', path: '/pages/mall/admin/setting/interface/onepass/index' },
          { id: 'setting_api_yht_config', title: '一号通配置', type: 'page', path: '/pages/mall/admin/setting/interface/onepass/config' }
        ]
      },
      { id: 'setting_api_storage', title: '系统存储配置', type: 'page', path: '/pages/mall/admin/setting/interface/storage' },
      { id: 'setting_api_collect', title: '商品采集配置', type: 'page', path: '/pages/mall/admin/setting/interface/collect' },
      { id: 'setting_api_logistics', title: '物流查询配置', type: 'page', path: '/pages/mall/admin/setting/interface/logistics' },
      { id: 'setting_api_waybill', title: '电子面单配置', type: 'page', path: '/pages/mall/admin/setting/interface/e-sheet' },
      { id: 'setting_api_sms', title: '短信接口配置', type: 'page', path: '/pages/mall/admin/setting/interface/sms' },
      { id: 'setting_api_pay', title: '商城支付配置', type: 'page', path: '/pages/mall/admin/setting/interface/payment' }
    ]
  }
]
