"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useDarkMode = void 0;
var _reactNative = require("react-native");
var _useConfig = _interopRequireDefault(require("./useConfig"));
var _react = require("react");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const useDarkMode = () => {
  const {
    preferred_theme
  } = (0, _useConfig.default)();
  const colorScheme = (0, _reactNative.useColorScheme)();
  const isDarkTheme = (0, _react.useMemo)(() => {
    return preferred_theme === 'dark' || preferred_theme === 'default' && colorScheme === 'dark';
  }, [colorScheme, preferred_theme]);
  return {
    isDarkTheme
  };
};
exports.useDarkMode = useDarkMode;
//# sourceMappingURL=useDarkMode.js.map