import {
  getTypography
} from "./chunk-KCUSJWDZ.js";
import {
  buttonsThemeBase,
  defaultButtonsTheme
} from "./chunk-ISDKKT5U.js";
import {
  cardFormThemeBase,
  defaultCardFormTheme
} from "./chunk-PHQ6NFOZ.js";
import {
  defaultLoadingTheme,
  loadingThemeBase
} from "./chunk-S5AV3X5O.js";
import {
  useBreakpoints
} from "./chunk-JSGRNWSB.js";
import {
  colors,
  darkGradient,
  hcNeutralFromBg,
  isColorKey
} from "./chunk-MIIIUXV6.js";
import {
  __spreadProps,
  __spreadValues
} from "./chunk-W7FAWX6T.js";

// src/styles/themes.tsx
import { css, useTheme } from "@emotion/react";
import merge from "deepmerge";
var Themes = /* @__PURE__ */ ((Themes2) => {
  Themes2["Light"] = "light";
  Themes2["Dark"] = "dark";
  Themes2["LightsparkDocsLight"] = "lightsparkDocsLight";
  Themes2["LightsparkDocsDark"] = "lightsparkDocsDark";
  Themes2["UmaAuthSdkLight"] = "umaAuthSdkLight";
  Themes2["UmaAuthSdkDark"] = "umaAuthSdkDark";
  Themes2["UmameDocsLight"] = "umameDocsLight";
  Themes2["UmameDocsDark"] = "umameDocsDark";
  Themes2["BridgeLight"] = "bridgeLight";
  Themes2["BridgeDark"] = "bridgeDark";
  Themes2["NageLight"] = "nageLight";
  Themes2["NageDark"] = "nageDark";
  return Themes2;
})(Themes || {});
function isTheme(theme) {
  return Object.values(Themes).includes(theme);
}
var baseThemeColors = {
  bg: colors.white,
  smBg: colors.white,
  c02Neutral: colors.gray98,
  c02NeutralLight: "#F9F9F91A",
  c05Neutral: colors.gray95,
  c1Neutral: colors.gray90,
  c15Neutral: colors.gray85,
  c2Neutral: colors.gray80,
  c25Neutral: colors.gray75,
  c3Neutral: colors.gray70,
  c4Neutral: colors.gray60,
  c5Neutral: colors.gray50,
  c6Neutral: colors.gray40,
  c7Neutral: colors.gray30,
  c8Neutral: colors.gray20,
  c9Neutral: colors.gray10,
  danger: colors.danger,
  hcNeutral: colors.black,
  info: colors.blue43,
  lcNeutral: colors.gray80,
  link: colors.blue43,
  linkLight: "#0068C90F",
  mcNeutral: colors.gray40,
  onInfoText: colors.white,
  onPrimaryText: colors.black,
  onSuccessText: colors.white,
  primary: colors.primary,
  secondary: colors.secondary,
  tertiary: colors.black,
  success: colors.success,
  text: colors.black,
  vlcNeutral: colors.gray95,
  warning: colors.warning,
  errorBackground: colors.errorBackground,
  errorText: colors.errorText,
  transparent: colors.transparent
};
var themeOrColorKeyValues = [
  ...Object.keys(baseThemeColors),
  ...Object.keys(colors)
];
var baseTheme = __spreadProps(__spreadValues({}, baseThemeColors), {
  // base type should be Themes but default to Light
  type: "light" /* Light */,
  typography: getTypography("Lightspark" /* Lightspark */),
  hcNeutralFromBg: (bgHex) => hcNeutralFromBg(bgHex, colors.black, colors.white),
  buttons: defaultButtonsTheme,
  loading: defaultLoadingTheme,
  cardForm: defaultCardFormTheme,
  badge: {
    bg: "c05Neutral"
  },
  inputBackground: colors.white
});
var lightBaseTheme = baseTheme;
var darkBaseTheme = {
  type: "dark" /* Dark */,
  bg: colors.black,
  smBg: colors.black,
  c02Neutral: colors.gray98,
  c02NeutralLight: "#F9F9F91A",
  c05Neutral: colors.gray5,
  c1Neutral: colors.gray10,
  c15Neutral: colors.gray15,
  c2Neutral: colors.gray20,
  c25Neutral: colors.gray25,
  c3Neutral: colors.gray30,
  c4Neutral: colors.gray40,
  c5Neutral: colors.gray50,
  c6Neutral: colors.gray60,
  c7Neutral: colors.gray70,
  c8Neutral: colors.gray80,
  c9Neutral: colors.gray90,
  danger: colors.danger,
  hcNeutral: colors.white,
  hcNeutralFromBg: (bgHex) => hcNeutralFromBg(bgHex, colors.white, colors.black),
  info: colors.white,
  lcNeutral: colors.gray40,
  link: colors.blue43,
  linkLight: "#0068C90F",
  mcNeutral: colors.gray60,
  onInfoText: colors.white,
  onPrimaryText: colors.black,
  onSuccessText: colors.white,
  primary: colors.primary,
  secondary: colors.secondary,
  tertiary: colors.white,
  success: colors.success,
  text: colors.white,
  typography: getTypography("Lightspark" /* Lightspark */),
  vlcNeutral: colors.gray20,
  warning: colors.warning,
  errorBackground: colors.errorBackground,
  errorText: colors.errorText,
  transparent: colors.transparent,
  buttons: defaultButtonsTheme,
  loading: defaultLoadingTheme,
  cardForm: defaultCardFormTheme,
  inputBackground: colors.black,
  badge: {
    bg: "c15Neutral"
  }
};
var lightTheme = extend(lightBaseTheme, {
  header: extendBase(lightBaseTheme, {
    text: colors.gray60
  }),
  nav: extendBase(lightBaseTheme, {
    text: colors.gray10,
    secondary: colors.gray40
  }),
  content: extendBase(lightBaseTheme, {
    bg: colors.white,
    smBg: colors.white
  }),
  controls: extendBase(lightBaseTheme, {
    bg: colors.gray95,
    smBg: colors.gray95,
    text: colors.gray60,
    secondary: colors.secondary
  })
});
var darkTheme = extend(darkBaseTheme, {
  header: extendBase(darkBaseTheme, {}),
  nav: extendBase(darkBaseTheme, {}),
  content: extendBase(darkBaseTheme, {}),
  controls: extendBase(darkBaseTheme, {
    bg: colors.gray40,
    smBg: colors.gray40,
    text: colors.white,
    secondary: colors.secondary
  }),
  buttons: merge(defaultButtonsTheme, {
    kinds: {
      secondary: {
        defaultBorderColor: "gray15"
      }
    }
  })
});
var umaAuthSdkLightTheme = extend(lightTheme, {
  type: "umaAuthSdkLight" /* UmaAuthSdkLight */,
  bg: colors.gray98,
  smBg: colors.gray98,
  secondary: colors.grayBlue43,
  tertiary: colors.grayBlue9,
  warning: "#F7E3E3",
  danger: "#E31A1A",
  text: colors.grayBlue9,
  link: colors.blue39,
  linkLight: "#0068C90F",
  inputBackground: colors.white,
  typography: getTypography("UmaAuthSdk" /* UmaAuthSdk */, {
    main: "Manrope",
    code: "Monaco"
  }),
  content: extendBase(lightBaseTheme, {
    bg: colors.gray98,
    smBg: colors.gray98,
    text: colors.grayBlue9,
    secondary: colors.grayBlue43
  }),
  controls: extendBase(lightBaseTheme, {
    text: colors.grayBlue9,
    secondary: colors.grayBlue43,
    bg: colors.grayBlue94
  }),
  buttons: merge(buttonsThemeBase, {
    defaultTypographyType: "Title",
    defaultSize: "Medium",
    defaultBorderRadius: 999,
    defaultPaddingsY: {
      ExtraSmall: {
        short: 14,
        regular: 16
      },
      Small: {
        short: 14,
        regular: 16
      },
      Schmedium: {
        short: 14,
        regular: 16
      },
      Medium: {
        short: 14,
        regular: 16
      },
      Mlarge: {
        short: 14,
        regular: 16
      },
      Large: {
        short: 14,
        regular: 16
      }
    },
    kinds: {
      primary: {
        defaultColor: "bg",
        defaultBorderColor: "blue39",
        defaultBackgroundColor: "blue39",
        defaultHoverBackgroundColor: "blue37",
        defaultHoverBorderColor: "blue37",
        defaultActiveBackgroundColor: "blue22",
        defaultActiveBorderColor: "blue22"
      },
      ghost: {
        defaultColor: "secondary",
        defaultBackgroundColor: "transparent",
        defaultHoverBackgroundColor: "transparent",
        defaultHoverBorderColor: "transparent",
        defaultPaddingsY: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        },
        defaultPaddingsX: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        }
      },
      secondary: {
        defaultBackgroundColor: "grayBlue94",
        defaultBorderColor: "grayBlue94",
        defaultHoverBackgroundColor: "grayBlue88",
        defaultHoverBorderColor: "grayBlue88",
        defaultActiveBackgroundColor: "grayBlue69",
        defaultActiveBorderColor: "grayBlue69"
      },
      quaternary: {
        defaultBackgroundColor: "transparent",
        defaultBorderColor: "grayBlue80",
        defaultHoverBackgroundColor: "grayBlue94",
        defaultHoverBorderColor: "grayBlue80",
        defaultActiveBackgroundColor: "grayBlue88",
        defaultActiveBorderColor: "grayBlue80"
      },
      tertiary: {
        defaultColor: "bg",
        defaultBackgroundColor: "grayBlue9",
        defaultHoverBackgroundColor: "grayBlue12",
        defaultActiveBackgroundColor: "grayBlue14"
      },
      transparent: {
        defaultBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "transparenta02",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "transparenta08",
        defaultActiveBorderColor: "transparent"
      },
      linkLight: {
        defaultColor: "link",
        defaultBackgroundColor: "linkLight",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "grayBlue93",
        defaultHoverBorderColor: "grayBlue93",
        defaultActiveBackgroundColor: "grayBlue92",
        defaultActiveBorderColor: "grayBlue92"
      },
      warning: {
        defaultColor: "danger",
        defaultBackgroundColor: "red42a10",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "red42a20",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "red42a30",
        defaultActiveBorderColor: "transparent"
      },
      danger: {
        defaultColor: "white"
      }
    }
  })
});
var umaAuthSdkDarkTheme = extend(darkTheme, {
  type: "umaAuthSdkDark" /* UmaAuthSdkDark */,
  bg: colors.gray5,
  smBg: colors.gray5,
  secondary: colors.grayBlue57,
  tertiary: colors.gray98,
  text: colors.gray98,
  link: colors.blue39,
  inputBackground: colors.gray5,
  typography: getTypography("UmaAuthSdk" /* UmaAuthSdk */, {
    main: "Manrope",
    code: "Monaco"
  }),
  content: extendBase(lightBaseTheme, {
    bg: colors.gray5,
    smBg: colors.gray5,
    text: colors.grayBlue94,
    secondary: colors.grayBlue43
  }),
  controls: extendBase(lightBaseTheme, {
    text: colors.grayBlue94,
    secondary: colors.grayBlue43,
    bg: colors.grayBlue9
  }),
  buttons: merge(buttonsThemeBase, {
    defaultTypographyType: "Title",
    defaultSize: "Medium",
    defaultBorderRadius: 999,
    defaultPaddingsY: {
      ExtraSmall: {
        short: 14,
        regular: 16
      },
      Small: {
        short: 14,
        regular: 16
      },
      Schmedium: {
        short: 14,
        regular: 16
      },
      Medium: {
        short: 14,
        regular: 16
      },
      Mlarge: {
        short: 14,
        regular: 16
      },
      Large: {
        short: 14,
        regular: 16
      }
    },
    kinds: {
      primary: {
        defaultColor: "bg",
        defaultBackgroundColor: "blue39",
        defaultHoverBackgroundColor: "blue37"
      },
      ghost: {
        defaultColor: "secondary",
        defaultBackgroundColor: "transparent",
        defaultHoverBackgroundColor: "transparent",
        defaultHoverBorderColor: "transparent",
        defaultPaddingsY: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        },
        defaultPaddingsX: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        }
      },
      secondary: {
        defaultBackgroundColor: "grayBlue80",
        defaultHoverBackgroundColor: "grayBlue94",
        defaultBorderColor: "grayBlue80"
      },
      tertiary: {
        defaultColor: "bg",
        defaultHoverBackgroundColor: "grayBlue80"
      },
      transparent: {
        defaultBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "transparenta02",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "transparenta08",
        defaultActiveBorderColor: "transparent"
      },
      linkLight: {
        defaultColor: "link",
        defaultBackgroundColor: "linkLight",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "linkLight",
        defaultHoverBorderColor: "transparent"
      },
      warning: {
        defaultColor: "danger",
        defaultBackgroundColor: "warning",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "warning",
        defaultHoverBorderColor: "transparent"
      }
    }
  })
});
var umameDocsLightTheme = extend(lightTheme, {
  type: "umameDocsLight" /* UmameDocsLight */,
  bg: colors.gray98,
  smBg: colors.gray98,
  secondary: colors.grayBlue43,
  text: colors.grayBlue9,
  link: colors.blue39,
  inputBackground: colors.white,
  typography: getTypography("UmameDocs" /* UmameDocs */, {
    main: "Manrope",
    code: "Monaco"
  }),
  content: extendBase(lightBaseTheme, {
    bg: colors.gray98,
    smBg: colors.gray98,
    text: colors.grayBlue9,
    secondary: colors.grayBlue43
  }),
  controls: extendBase(lightBaseTheme, {
    text: colors.grayBlue9,
    secondary: colors.grayBlue43,
    bg: colors.grayBlue94
  })
});
var umameDocsDarkTheme = extend(darkTheme, {
  type: "umameDocsDark" /* UmameDocsDark */,
  bg: colors.gray98,
  smBg: colors.gray98,
  secondary: colors.grayBlue43,
  text: colors.grayBlue9,
  link: colors.blue39,
  typography: getTypography("UmameDocs" /* UmameDocs */, {
    main: "Manrope",
    code: "Monaco"
  })
});
var lightsparkDocsLightTheme = extend(lightTheme, {
  type: "lightsparkDocsLight" /* LightsparkDocsLight */,
  typography: getTypography("LightsparkDocs" /* LightsparkDocs */)
});
var lightsparkDocsDarkTheme = extend(darkTheme, {
  type: "lightsparkDocsDark" /* LightsparkDocsDark */,
  typography: getTypography("LightsparkDocs" /* LightsparkDocs */)
});
var bridgeBaseSettings = {
  secondary: colors.grayBlue43,
  mcNeutral: colors.grayBlue43,
  success: colors.green37,
  link: colors.blue39,
  linkLight: colors.blue10,
  typography: getTypography("Bridge" /* Bridge */, {
    main: "Manrope",
    code: "Roboto Mono"
  }),
  buttons: merge(buttonsThemeBase, {
    defaultTypographyType: "Title",
    defaultSize: "Medium",
    defaultBorderRadius: 999,
    defaultPaddingsY: {
      ExtraSmall: 10,
      Small: 10,
      Schmedium: 13,
      Medium: 13,
      Mlarge: 13,
      Large: 13
    },
    defaultPaddingsX: {
      ExtraSmall: 16,
      Small: 16,
      Schmedium: 24,
      Medium: 24,
      Mlarge: 24,
      Large: 24
    },
    kinds: {
      primary: {
        defaultColor: "bg",
        defaultBackgroundColor: "blue39",
        defaultBorderColor: "blue39",
        defaultHoverBackgroundColor: "blue37",
        defaultHoverBorderColor: "blue37",
        defaultActiveBackgroundColor: "blue22",
        defaultActiveBorderColor: "blue22"
      },
      ghost: {
        defaultColor: "secondary",
        defaultBackgroundColor: "transparent",
        defaultHoverBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "transparent",
        defaultPaddingsY: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        },
        defaultPaddingsX: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        }
      },
      secondary: {
        defaultBackgroundColor: "gray99",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "grayBlue94",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "grayBlue88",
        defaultActiveBorderColor: "transparent"
      },
      tertiary: {
        defaultColor: "gray99",
        defaultBackgroundColor: "gray99",
        defaultBorderColor: "gray99",
        defaultHoverBackgroundColor: "gray98",
        defaultHoverBorderColor: "gray98",
        defaultActiveBackgroundColor: "gray",
        defaultActiveBorderColor: "gray"
      },
      transparent: {
        defaultColor: "secondary",
        defaultBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "transparenta02",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "transparenta08",
        defaultActiveBorderColor: "transparent"
      },
      gray: {
        defaultColor: "gray",
        defaultBackgroundColor: "gray",
        defaultBorderColor: "gray",
        defaultHoverBackgroundColor: "grayhover",
        defaultHoverBorderColor: "grayhover",
        defaultActiveBackgroundColor: "grayactive",
        defaultActiveBorderColor: "grayactive"
      },
      grayGradient: {
        defaultColor: "gray98",
        defaultBackgroundColor: "gray98",
        defaultBorderColor: "gray98",
        defaultHoverBackgroundColor: "gray98",
        defaultHoverBorderColor: "gray98"
      },
      linkLight: {
        defaultColor: "link",
        defaultBackgroundColor: "linkLight",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "linkLight",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "linkLight",
        defaultActiveBorderColor: "transparent"
      },
      locked: {
        defaultColor: "gray75",
        defaultBackgroundColor: "gray75",
        defaultBorderColor: "gray75",
        defaultHoverBackgroundColor: "gray75hover",
        defaultHoverBorderColor: "gray75hover",
        defaultActiveBackgroundColor: "gray75active",
        defaultActiveBorderColor: "gray75active"
      },
      warningLight: {
        defaultColor: "errorText",
        defaultBackgroundColor: "errorBackground",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "errorBackground",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "errorBackground",
        defaultActiveBorderColor: "transparent"
      }
    }
  }),
  loading: merge(loadingThemeBase, {
    defaultIconName: "UmaBridgeLoading",
    kinds: {
      primary: {
        defaultIconName: "UmaBridgeLoading"
      },
      secondary: {
        defaultIconName: "UmaBridgeLoadingTransparent"
      }
    }
  }),
  cardForm: merge(cardFormThemeBase, {
    backgroundColor: "white",
    smBackgroundColor: "bg",
    borderRadius: 32,
    contentMarginTop: 0,
    defaultDescriptionTypographyMap: {
      default: {
        type: "Body",
        size: "Medium",
        color: "secondary"
      },
      link: {
        type: "Body",
        size: "Medium",
        color: "text"
      }
    },
    kinds: {
      primary: {
        borderWidth: 1,
        smBorderWidth: 0,
        borderColor: "gray3",
        paddingTop: 24,
        paddingBottom: 64,
        paddingX: 40,
        shadow: "none"
      },
      secondary: {
        borderWidth: 1,
        smBorderWidth: 0,
        borderColor: "gray3",
        paddingTop: 32,
        paddingBottom: 64,
        paddingX: 32,
        shadow: "none"
      }
    }
  }),
  badge: {
    bg: "grayBlue94"
  }
};
var bridgeLightTheme = extend(lightTheme, __spreadProps(__spreadValues({}, bridgeBaseSettings), {
  type: "bridgeLight" /* BridgeLight */,
  bg: colors.gray98,
  smBg: colors.gray98,
  text: colors.grayBlue9,
  secondary: colors.gray2,
  tertiary: colors.gray6,
  inputBackground: colors.white,
  danger: colors.red50
}));
var bridgeDarkTheme = extend(darkTheme, __spreadProps(__spreadValues({}, bridgeBaseSettings), {
  type: "bridgeDark" /* BridgeDark */
}));
var nageBaseSettings = {
  secondary: colors.grayBlue43,
  mcNeutral: colors.grayBlue43,
  success: colors.green37,
  typography: getTypography("Nage" /* Nage */, {
    main: "SuisseIntl",
    code: "SuisseIntl-Mono"
  }),
  buttons: merge(buttonsThemeBase, {
    defaultTypographyType: "Btn",
    defaultSize: "Medium",
    defaultBorderRadius: 8,
    defaultPaddingsY: {
      ExtraSmall: 6,
      Small: 6,
      Schmedium: 8,
      Medium: 8,
      Mlarge: 10,
      Large: 10
    },
    defaultPaddingsX: {
      ExtraSmall: 8,
      Small: 8,
      Schmedium: 12,
      Medium: 12,
      Mlarge: 12,
      Large: 12
    },
    kinds: {
      primary: {
        defaultColor: "white",
        defaultBackgroundColor: "gray-950",
        defaultBorderColor: "gray-050",
        defaultHoverBackgroundColor: "gray-950",
        defaultHoverBorderColor: "gray-050",
        defaultActiveBackgroundColor: "gray-950",
        defaultActiveBorderColor: "gray-050"
      },
      ghost: {
        defaultColor: "secondary",
        defaultBackgroundColor: "transparent",
        defaultHoverBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "transparent",
        defaultPaddingsY: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        },
        defaultPaddingsX: {
          ExtraSmall: 0,
          Small: 0,
          Schmedium: 0,
          Medium: 0,
          Mlarge: 0,
          Large: 0
        }
      },
      secondary: {
        defaultBackgroundColor: "gray-050",
        defaultBorderColor: "gray-210",
        defaultHoverBackgroundColor: "gray-090",
        defaultHoverBorderColor: "gray-250",
        defaultActiveBackgroundColor: "gray-210",
        defaultActiveBorderColor: "gray-275"
      },
      warning: {
        defaultColor: "warningText2",
        defaultBackgroundColor: "warningBackground2",
        defaultBorderColor: "warningBackground2",
        defaultHoverBackgroundColor: "warningBackgroundHover",
        defaultHoverBorderColor: "warningBackgroundHover",
        defaultActiveBackgroundColor: "warningBackgroundActive",
        defaultActiveBorderColor: "warningBackgroundActive"
      },
      transparent: {
        defaultBackgroundColor: "transparent",
        defaultBorderColor: "transparent",
        defaultHoverBackgroundColor: "black-04",
        defaultHoverBorderColor: "transparent",
        defaultActiveBackgroundColor: "black-10",
        defaultActiveBorderColor: "transparent"
      }
    }
  }),
  loading: merge(loadingThemeBase, {
    defaultIconName: "CentralLoadingCircle",
    kinds: {
      primary: {
        defaultIconName: "CentralLoadingCircle"
      },
      secondary: {
        defaultIconName: "CentralLoadingCircle"
      }
    }
  })
};
var nageLightTheme = extend(lightTheme, __spreadProps(__spreadValues({}, nageBaseSettings), {
  type: "nageLight" /* NageLight */,
  bg: colors["gray-100"],
  smBg: colors["gray-100"],
  text: colors["gray-950"],
  secondary: colors["gray-500"],
  tertiary: colors.gray6,
  inputBackground: colors["gray-050"],
  danger: colors.red50
}));
var nageDarkTheme = extend(darkTheme, __spreadProps(__spreadValues({}, nageBaseSettings), {
  type: "nageDark" /* NageDark */
}));
var themes = {
  ["light" /* Light */]: lightTheme,
  ["dark" /* Dark */]: darkTheme,
  ["lightsparkDocsLight" /* LightsparkDocsLight */]: lightsparkDocsLightTheme,
  ["lightsparkDocsDark" /* LightsparkDocsDark */]: lightsparkDocsDarkTheme,
  ["umaAuthSdkLight" /* UmaAuthSdkLight */]: umaAuthSdkLightTheme,
  ["umaAuthSdkDark" /* UmaAuthSdkDark */]: umaAuthSdkDarkTheme,
  ["umameDocsLight" /* UmameDocsLight */]: umameDocsLightTheme,
  ["umameDocsDark" /* UmameDocsDark */]: umameDocsDarkTheme,
  ["bridgeLight" /* BridgeLight */]: bridgeLightTheme,
  ["bridgeDark" /* BridgeDark */]: bridgeDarkTheme,
  ["nageLight" /* NageLight */]: nageLightTheme,
  ["nageDark" /* NageDark */]: nageDarkTheme
};
function extend(obj, rest) {
  return __spreadValues(__spreadValues({}, obj), rest);
}
function extendBase(obj, rest) {
  return __spreadValues(__spreadValues({}, obj), rest);
}
function setFonts(theme, fontFamilies) {
  return __spreadProps(__spreadValues({}, theme), {
    typography: getTypography(theme.typography.group, fontFamilies)
  });
}
function isThemeColorKey(key) {
  return Boolean(key && typeof key === "string" && key in baseThemeColors);
}
function isThemeOrColorKey(key) {
  return Boolean(
    typeof key === "string" && (isThemeColorKey(key) || isColorKey(key) || Array.isArray(key) && key.length === 2 && isThemeColorKey(key[1]))
  );
}
function getColor(theme, key) {
  if (key && isThemeColorKey(key)) {
    return theme[key];
  } else if (key && Array.isArray(key)) {
    const [surface, colorKey] = key;
    const surfaceTheme = theme[surface];
    const color = surfaceTheme[colorKey];
    return color;
  } else if (key && isColorKey(key)) {
    return colors[key];
  }
  return theme.text;
}
function getFontColor(theme, key, defaultColor = "inherit") {
  if (key === "inherit" || !key && defaultColor === "inherit") {
    return "inherit";
  }
  return getColor(theme, key);
}
function isBackgroundColorKey(key) {
  return key === "transparent" || isThemeOrColorKey(key);
}
function isBackgroundColorKeyTuple(key) {
  return Array.isArray(key) && key.length === 2 && isBackgroundColorKey(key[0]) && isBackgroundColorKey(key[1]);
}
function getBackgroundColor(theme, key, defaultColor = "transparent") {
  if (isBackgroundColorKeyTuple(key)) {
    key = isLight(theme) ? key[0] : key[1];
  }
  if (isBackgroundColorKeyTuple(defaultColor)) {
    defaultColor = isLight(theme) ? defaultColor[0] : defaultColor[1];
  }
  if (key === "transparent") {
    return "transparent";
  } else if (!key) {
    if (defaultColor === "transparent") {
      return "transparent";
    }
    return getColor(theme, defaultColor);
  }
  return getColor(theme, key);
}
var isDark = (theme) => [
  "dark" /* Dark */,
  "bridgeDark" /* BridgeDark */,
  "nageDark" /* NageDark */,
  "lightsparkDocsDark" /* LightsparkDocsDark */,
  "umameDocsDark" /* UmameDocsDark */,
  "umaAuthSdkDark" /* UmaAuthSdkDark */
].includes(theme.type);
var isLight = (theme) => [
  "light" /* Light */,
  "bridgeLight" /* BridgeLight */,
  "nageLight" /* NageLight */,
  "lightsparkDocsLight" /* LightsparkDocsLight */,
  "umameDocsLight" /* UmameDocsLight */,
  "umaAuthSdkLight" /* UmaAuthSdkLight */
].includes(theme.type);
var isBridge = (theme) => ["bridgeLight" /* BridgeLight */, "bridgeDark" /* BridgeDark */].includes(theme.type);
var isNage = (theme) => ["nageLight" /* NageLight */, "nageDark" /* NageDark */].includes(theme.type);
var themeOr = (lightValue, darkValue) => ({ theme }) => {
  return isLight(theme) ? lightValue : darkValue;
};
var themeOrWithKey = (lightValue, darkValue) => ({ theme }) => {
  if (isLight(theme)) {
    return getColor(theme, lightValue);
  }
  return getColor(theme, darkValue);
};
function ifLight(style) {
  return function({ theme }) {
    if (theme.type === "light" /* Light */) {
      return css`
        ${style}
      `;
    }
    return "";
  };
}
function ifDark(style) {
  return function({ theme }) {
    if (theme.type === "dark" /* Dark */) {
      return css`
        ${style}
      `;
    }
    return "";
  };
}
function useThemeBg() {
  const theme = useTheme();
  const bp = useBreakpoints();
  const isSm = bp.current("sm" /* sm */);
  if (isDark(theme)) {
    return darkGradient;
  }
  return isSm ? theme.smBg : theme.bg;
}

export {
  Themes,
  isTheme,
  themeOrColorKeyValues,
  themes,
  setFonts,
  isThemeColorKey,
  isThemeOrColorKey,
  getColor,
  getFontColor,
  isBackgroundColorKey,
  isBackgroundColorKeyTuple,
  getBackgroundColor,
  isDark,
  isLight,
  isBridge,
  isNage,
  themeOr,
  themeOrWithKey,
  ifLight,
  ifDark,
  useThemeBg
};
