"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@vis.gl/react-mapbox"),a=require("@mapbox/mapbox-gl-draw"),t=require("./draw-styles.js"),n=require("./useDrawEventHandlers.js"),o=require("./useDrawInitialization.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css");var l=i(a),s=function(a){var i=a.mapStyle,s=a.initialPolygon,u=a.onDrawCreate,d=a.onDrawUpdate,w=a.onDrawDelete,p=a.onModeChange,D=a.onSelectionChange,c=a.drawRef,f=e.useMemo((function(){return{onDrawCreate:u,onDrawUpdate:d,onDrawDelete:w,onModeChange:p,onSelectionChange:D}}),[u,d,w,p,D]),g=n.useDrawEventHandlers(f,c),m=g.onAdd,y=g.onRemove,C=r.useControl((function(){return new l.default({displayControlsDefault:!1,defaultMode:"simple_select",styles:t.getDrawStyles(i),keybindings:!1})}),m,y,{position:"top-right"});return o.useDrawInitialization(C,c,s),null};s.displayName="DrawControl",exports.DrawControl=s;
//# sourceMappingURL=DrawControl.js.map
