"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useBloomTheme = useBloomTheme;
exports.useTheme = useTheme;
exports.useThemeColor = useThemeColor;
var _react = require("react");
var _BloomThemeProvider = require("./BloomThemeProvider.js");
function useTheme() {
  const ctx = (0, _react.useContext)(_BloomThemeProvider.BloomThemeContext);
  if (!ctx) {
    throw new Error('useTheme must be used within a <BloomThemeProvider>');
  }
  return ctx.theme;
}
function useThemeColor(colorKey) {
  const theme = useTheme();
  return theme.colors[colorKey];
}
function useBloomTheme() {
  const ctx = (0, _react.useContext)(_BloomThemeProvider.BloomThemeContext);
  if (!ctx) {
    throw new Error('useBloomTheme must be used within a <BloomThemeProvider>');
  }
  return ctx;
}
//# sourceMappingURL=use-theme.js.map