import type { AxiosResponse } from 'axios'
import type { Result, FrameConfigInfo } from '@cacp/ui'
import http from '@/utils/http'
import config from '@/config'

const contextPath = '/frame'

export async function getFrameConfig(): Promise<Result<FrameConfigInfo>> {
  // const res: AxiosResponse<Result<FrameConfigInfo>> = await http.get(
  //   `${config.FRAME_API}${contextPath}/get-frame-config`,
  // )
  // return res.data
  const res: Result<FrameConfigInfo> = {
    code: "0",
    message: '',
    data: {
      user:{
        userId: 'f9818bc4-04da-a061-436b-1d6db6811e21',
        userName: '统一入口测试',     // 修正为字符串类型
        parentId: 'cbb75ed0-dfbf-4772-b560-33613a8dee82',
        fullPathName: '中国海关\\武汉海关\\科技处\\信息化应用与管理科',
        personId: '4708060',
        customsCode: '4700',
        status: '1',             // 状态通常用数字
        sortOrder: '1',
        email: 'email@example.com',
        mobile: '13800138000',
        rankCode: '职级代码',
        rankName: '职级名称',
        sideline: false,
        ipAddress: '127.0.0.1',
        viewCode: 'CCIC_VIEW',
        logonType: '1',
        logonTime: '2023-01-01 10:00:00'
      },
      theme:{
        userId: 'f9818bc4-04da-a061-436b-1d6db6811e21',
        userName:  '统一入口测试',
        themeCode:  'default',
        elderMode: false,
        forceFlag: false
      },
      themeTypeList:[
        {
          themeCode: 'default',
          themeName: '海关蓝'
        },
        {
          themeCode: "red",
          themeName: "政务红",
        }
      ],
      delegates: [
        {
          delegateId: 'string;',
          assignParentId: 'string;',
          assignUserId: 'string;',
          assignUserPath: 'string;',
          delegateParentId: 'string;',
          delegateUserId: 'string;',
          delegateUserPath: 'string;',
          begDate:'string;',
          endDate:'string;',
        }
      ],
      extraAttrs: { ['']: '' },
    },
  }
  return res;
}
