"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useIconThemed = void 0;
var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
/**
 * Warning -- if additional color modes beyond light and dark are added in future -- this will have unexpected behaviour
 */
var useIconThemed = exports.useIconThemed = function useIconThemed() {
  var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
    colorMode = _useThemeObserver.colorMode;
  return {
    iconThemed: function iconThemed(colors) {
      return colorMode && colorMode === 'dark' ? colors['dark'] : colors['light'];
    }
  };
};