var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
import { merge } from "@gympass/yoga-common";
import componentThemes from "./componentThemes";
const getComponentThemes = (theme2) => {
  const { colors, baseFont, baseFontSize } = theme2;
  const components = Object.entries(componentThemes).reduce(
    (componentsStyles, [names, themed]) => {
      const name = names.toLowerCase();
      return __spreadProps(__spreadValues({}, componentsStyles), {
        [name]: themed(__spreadProps(__spreadValues({}, theme2), {
          colors,
          baseFont,
          baseFontSize
        }))
      });
    },
    {}
  );
  return { components };
};
const theme = (tokens) => {
  const baseFont = tokens.fonts.rubik;
  const baseFontSize = tokens.fontSizes.medium;
  const colors = __spreadProps(__spreadValues({}, tokens.colors), {
    primary: tokens.colors.vibin,
    secondary: tokens.colors.stamina,
    feedback: {
      success: Object.assign([tokens.colors.success, tokens.colors.hope], {
        light: tokens.colors.success,
        dark: tokens.colors.hope
      }),
      informative: Object.assign([tokens.colors.neutral, tokens.colors.relax], {
        light: tokens.colors.neutral,
        dark: tokens.colors.relax
      }),
      attention: Object.assign([tokens.colors.attention, tokens.colors.verve], {
        light: tokens.colors.attention,
        dark: tokens.colors.verve
      }),
      neutral: Object.assign([tokens.colors.light, tokens.colors.medium], {
        light: tokens.colors.light,
        dark: tokens.colors.medium
      })
    },
    text: {
      primary: tokens.colors.stamina,
      secondary: tokens.colors.deep,
      disabled: tokens.colors.steady
    },
    elements: {
      selectionAndIcons: tokens.colors.medium,
      lineAndBorders: tokens.colors.light,
      backgroundAndDisabled: tokens.colors.clear
    }
  });
  return __spreadProps(__spreadValues({}, tokens), {
    colors,
    baseFont,
    baseFontSize,
    v3theme: false
  });
};
const composeTheme = (tokens, customTheming = {}) => {
  const baseTheme = theme(tokens);
  const customTheme = merge(baseTheme, customTheming);
  const componentTheming = getComponentThemes(customTheme);
  return merge(componentTheming, customTheme);
};
var theme_default = composeTheme;
export {
  theme_default as default
};
