/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{unsafeGetCalciteModeName as t}from"@arcgis/toolkit/dom";const o="--esri-calcite-mode-name";function r(){const t=getComputedStyle(document.body).getPropertyValue(o).replaceAll(/\W/g,"").toLowerCase();return"dark"===t||"light"===t?t:void 0}const e="calcite-mode-";function n(o){return r()??t(o??document.body)}function c(t){return"dark"===n(t)}function i(t){return`${e}${t}`}function s(t){return i(n(t))}function a(t){const o=s(t);u(t),t.classList.add(o)}function u(t){Array.from(t.classList).forEach(o=>{o.startsWith(e)&&t.classList.remove(o)})}export{s as getCalciteModeClass,i as getCalciteModeClassName,c as isDarkMode,o as modeNameCustomCSSProp,a as setCalciteModeClass};
