import { am as LazyLoad, w as appContext, i as __read, W as _default } from './MapEditView-24782753.js';
import * as React from 'react';
import { observer } from 'mobx-react';
import 'maptalks';
import 'lodash';
import 'uuid';
import 'mobx';
import 'lz-string';
import 'dayjs';
import 'react-dom';
import 'classnames';
import 'react-is';
import '@loadable/component';
import 'js-beautify';
import 'axios';
import 'superstruct';
import '@tanem/react-nprogress';
import 'jquery';
import 'chroma-js';
import 'js-cookie';
import 'is-email';
import 'is-uuid';
import 'is-url';
import 'anymatch';
import 'perf-request';
import '@syncpoint/wkx';
import 'buffer';
import '@turf/turf';
import '@mapbox/polylabel';
import 'turf-multipolygon';
import 'turf-polygon';
import 'gcoord';
import 'eventemitter2';
import 'geobuf';
import 'localforage';
import 'rc-menu';
import 'perfect-scrollbar';
import 'ahooks';
import 'jszip';
import 'file-saver';
import 'screenfull';
import 'sql-formatter-fork';
import 'array-move';
import 'turf-multilinestring';
import 'copy-to-clipboard';
import 'maptalks.three';
import 'ajv';
import 'spark-md5';
import 'react-draggable';
import 'react-virtualized';
import 'turf-point';
import 'decamelize';
import 'rbush';
import 'qs';
import 'maptalks.snap';
import 'react-use';
import 'react-rnd';
import 'react-beautiful-dnd';

var CssCodeEditor = LazyLoad(function () { return import('./index-c52671fd.js'); });
var MapCustomCssEditor = observer(function (props) {
    var onCancel = props.onCancel;
    var routeStore = React.useContext(appContext.getContext()).routeStore;
    var MapSettingStore = routeStore.MapSettingStore;
    var mapCustomCss = MapSettingStore.mapCustomCss, setMapCustomCss = MapSettingStore.setMapCustomCss, formatMapCustomCssCode = MapSettingStore.formatMapCustomCssCode;
    var _a = __read(_default(), 2), ref = _a[0], _b = _a[1], height = _b.height, width = _b.width;
    console.log(onCancel, 'onCancel');
    return (React.createElement("div", { ref: ref, style: { height: '100%' } },
        React.createElement(CssCodeEditor, { height: "".concat(height, "px"), width: "".concat(width, "px"), onChange: setMapCustomCss, 
            // onValidate={onValidate}
            value: mapCustomCss, commands: [
                {
                    name: 'indent',
                    bindKey: { win: 'Ctrl-[', mac: 'Command-[' },
                    exec: function () {
                        formatMapCustomCssCode();
                    },
                },
            ] })));
});
var MapCustomCssEditor$1 = MapCustomCssEditor;

export { MapCustomCssEditor$1 as default };
