/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{convertTime as o}from"../core/timeUtils.js";import{getLocale as t,getLocaleLanguage as l}from"./locale.js";import{Duration as n}from"luxon";function r(t,l="milliseconds",r={}){const i={locale:e(),numberingSystem:"latn"};let s;return s=t?n.fromMillis(o(t,l,"milliseconds"),i).rescale():n.fromObject({seconds:0},i),s.toHuman({listStyle:"narrow",unitDisplay:"long",...r})}function e(){const o=t();return"bs"===l(o)?"hr":o}export{r as formatDuration};
