/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{toUnit as e}from"../../../../../core/quantity.js";import{adaptiveAreaUnit as r,adaptiveLengthUnit as s}from"../../../../../core/units.js";function t(s,t){return e(s,r(s.value,s.unit,t))}function a(r,s){return e(r,u(r,s))}function u(e,r){const t=n(r);return s(e.value,e.unit,t)}function n(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{n as deriveLengthUnitFromAreaUnit,u as preferredLengthUnit,t as toPreferredAreaUnit,a as toPreferredLengthUnit};
