//@ts-nocheck
import React from 'react';
import DistrictIndex from './modals/DistrictIndex';
import KeyArea from './modals/KeyArea';
import KeyAreaDetail from './modals/KeyAreaDetail';
import DataBase from './modals/DataBase';
import DataActivity from './modals/DataActivity';
import DataGovernance from './modals/DataGovernance';
import { ModalMapping } from './type';

export type ModalKey = keyof typeof Registry;

/** @see ModalMapping 弹窗注册在这里 */
const Registry = {
  districtIndex: {
    defaultConfig: {
      w: 2756,
      h: 846,
      title: '行业指数',
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<DistrictIndex />, props),
  },

  keyArea: {
    defaultConfig: {
      w: 2771,
      h: 846,
      title: '重点区域',
      keepalive: true,
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<KeyArea />, props),
  },
  KeyAreaDetail: {
    defaultConfig: {
      w: 2771,
      h: 846,
      title: '重点区域详情',
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<KeyAreaDetail />, props),
  },
  DataBase: {
    defaultConfig: {
      w: 2343,
      h: 846,
      title: '数据仓库',
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<DataBase />, props),
  },
  DataActivity: {
    defaultConfig: {
      w: 1616,
      h: 935,
      title: '城市管理数据标签体系',
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<DataActivity />, props),
  },
  DataGovernance: {
    defaultConfig: {
      w: 1424,
      h: 846,
      title: '城管数据治理概况',
    },
    defaultProps: {},
    render: (props: any) => React.cloneElement(<DataGovernance />, props),
  }
};

export default Registry;
