import { jsx } from 'react/jsx-runtime';
import React, { useRef, useImperativeHandle } from 'react';
import DrillableMap from '../drillable-map.js';
import { rootGeoJson, childrenGeoJsonMap } from './config.js';

var index = React.forwardRef((props, ref) => {
    const drillableMapRef = useRef(null);
    useImperativeHandle(ref, () => {
        var _a;
        return ({
            echartsInstance: (_a = drillableMapRef.current) === null || _a === void 0 ? void 0 : _a.echartsInstance,
            backToUpperLevel: () => {
                var _a;
                (_a = drillableMapRef.current) === null || _a === void 0 ? void 0 : _a.backToUpperLevel();
            },
            drillDown: (mapName) => {
                var _a;
                (_a = drillableMapRef.current) === null || _a === void 0 ? void 0 : _a.drillDown(mapName);
            },
        });
    });
    return (jsx(DrillableMap, Object.assign({ ref: drillableMapRef, rootGeoJson: rootGeoJson, childrenGeoJsonMap: childrenGeoJsonMap }, props)));
});

export { index as default };
//# sourceMappingURL=index.js.map
