/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{cyclicalDegrees as r}from"./Cyclical.js";import{toUnit as t}from"./quantity.js";import{formatAngleDegrees as e,formatRelativeDecimal as a,formatMetricRelativeVerticalLength as i,formatImperialRelativeVerticalLength as n,formatDecimal as u,formatMetricVerticalLength as c,formatImperialVerticalLength as l,formatMetricLength as o,formatImperialLength as m,formatMetricRelativeLength as b,formatImperialRelativeLength as f,formatMetricArea as s,formatImperialArea as v,formatMetricVolume as p,formatImperialVolume as h,formatDMS as g,formatRelativeAngleDegrees as d}from"./unitFormatUtils.js";function L(r,e,a,i=2,n="abbr"){return u(r,t(e,a).value,a,i,n)}function M(r,e,i,n=2,u="abbr"){return a(r,t(e,i).value,i,n,u)}function w(r,t,e=2,a="abbr"){return o(r,t.value,t.unit,e,a)}function I(r,t,e=2,a="abbr"){return b(r,t.value,t.unit,e,a)}function V(r,t,e=2,a="abbr"){return c(r,t.value,t.unit,e,a)}function y(r,t,e=2,a="abbr"){return i(r,t.value,t.unit,e,a)}function R(r,t,e=2,a="abbr"){return s(r,t.value,t.unit,e,a)}function j(r,t,e=2,a="abbr"){return p(r,t.value,t.unit,e,a)}function D(r,t,e=2,a="abbr"){return m(r,t.value,t.unit,e,a)}function A(r,t,e=2,a="abbr"){return f(r,t.value,t.unit,e,a)}function T(r,t,e=2,a="abbr"){return l(r,t.value,t.unit,e,a)}function k(r,t,e=2,a="abbr"){return n(r,t.value,t.unit,e,a)}function q(r,t,e=2,a="abbr"){return v(r,t.value,t.unit,e,a)}function x(r,t,e=2,a="abbr"){return h(r,t.value,t.unit,e,a)}function C(r){return g(r.value,r.unit)}function F(t,a,i,n=r,u=!0){return e(t.value,t.unit,t.rotationType,a,i,n,u)}function S(r,t,e){return d(r.value,r.unit,r.rotationType,t,e??void 0)}function U(r,t,e,a,i="abbr"){switch(a=a??2,e){case"imperial":return D(r,t,a,i);case"metric":return w(r,t,a,i);default:return L(r,t,e,a,i)}}function z(r,t,e,a=2,i="abbr"){switch(e){case"imperial":return A(r,t,a,i);case"metric":return I(r,t,a,i);default:return M(r,t,e,a,i)}}function B(r,t,e,a=2,i="abbr"){switch(e){case"imperial":return T(r,t,a,i);case"metric":return V(r,t,a,i);default:return L(r,t,e,a,i)}}function E(r,t,e,a=2,i="abbr"){switch(e){case"imperial":return k(r,t,a,i);case"metric":return y(r,t,a,i);default:return M(r,t,e,a,i)}}function G(r,t,e,a=2,i="abbr"){switch(e){case"imperial":return q(r,t,a,i);case"metric":return R(r,t,a,i);default:return L(r,t,e,a,i)}}function H(r,t,e,a=2,i="abbr"){switch(e){case"imperial":return x(r,t,a,i);case"metric":return j(r,t,a,i);default:return L(r,t,e,a,i)}}const J={"cubic-millimeters":0,"cubic-centimeters":0,"cubic-decimeters":1,"cubic-meters":2,"cubic-kilometers":6,"cubic-inches":0,"cubic-feet":2,"cubic-us-feet":2,"cubic-yards":2,"cubic-miles":6,liters:2,megaliters:2,gigaliters:2};function K(r){return J[r]}export{F as formatAngle,G as formatArea,C as formatDMS,L as formatDecimal,q as formatImperialArea,D as formatImperialLength,A as formatImperialRelativeLength,k as formatImperialRelativeVerticalLength,T as formatImperialVerticalLength,x as formatImperialVolume,U as formatLength,R as formatMetricArea,w as formatMetricLength,I as formatMetricRelativeLength,y as formatMetricRelativeVerticalLength,V as formatMetricVerticalLength,j as formatMetricVolume,S as formatRelativeAngle,M as formatRelativeDecimal,z as formatRelativeLength,E as formatRelativeVerticalLength,B as formatVerticalLength,H as formatVolume,K as preferredVolumePrecision};
