import{i as e}from"./chunk-aKtaBQYM.js";import{Vt as t,Y as n}from"./mui-B6lh3XSP.js";import{B as r,I as i,R as a}from"./index-KVuxnkWj.js";var o=e(r(),1),s=e(t(),1),c=()=>{let e=n(),t=a(`distanceUnit`),r=(0,s.useMemo)(()=>new o.default.ScaleControl,[]);return(0,s.useEffect)(()=>(i.addControl(r,e.direction===`rtl`?`bottom-right`:`bottom-left`),()=>i.removeControl(r)),[r,e.direction]),(0,s.useEffect)(()=>{switch(t){case`mi`:r.setUnit(`imperial`);break;case`nmi`:r.setUnit(`nautical`);break;default:r.setUnit(`metric`);break}},[r,t]),null};export{c as t};