import { D as DEFAULT_THEME, C as COLOR_MIXES, U as UTILITY_COLORS } from './constants-fce138fa.js';
export { g as getPseudoRandomBackground } from './prand-4c0d6ea7.js';

/**
 * A simple guard function:
 *
 * ```js
 * Math.min(Math.max(low, value), high)
 * ```
 */
function guard(low, high, value) {
  return Math.min(Math.max(low, value), high);
}

class ColorError extends Error {
  constructor(color) {
    super(`Failed to parse color: "${color}"`);
  }
}
var ColorError$1 = ColorError;

/**
 * Parses a color into red, gree, blue, alpha parts
 *
 * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color
 */
function parseToRgba(color) {
  if (typeof color !== 'string') throw new ColorError$1(color);
  if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];
  let normalizedColor = color.trim();
  normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;
  const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
  if (reducedHexMatch) {
    const arr = Array.from(reducedHexMatch).slice(1);
    return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];
  }
  const hexMatch = hexRegex.exec(normalizedColor);
  if (hexMatch) {
    const arr = Array.from(hexMatch).slice(1);
    return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];
  }
  const rgbaMatch = rgbaRegex.exec(normalizedColor);
  if (rgbaMatch) {
    const arr = Array.from(rgbaMatch).slice(1);
    return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];
  }
  const hslaMatch = hslaRegex.exec(normalizedColor);
  if (hslaMatch) {
    const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
    if (guard(0, 100, s) !== s) throw new ColorError$1(color);
    if (guard(0, 100, l) !== l) throw new ColorError$1(color);
    return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];
  }
  throw new ColorError$1(color);
}
function hash(str) {
  let hash = 5381;
  let i = str.length;
  while (i) {
    hash = hash * 33 ^ str.charCodeAt(--i);
  }

  /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
   * integers. Since we want the results to be always positive, convert the
   * signed int to an unsigned by doing an unsigned bitshift. */
  return (hash >>> 0) % 2341;
}
const colorToInt = x => parseInt(x.replace(/_/g, ''), 36);
const compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {
  const key = colorToInt(next.substring(0, 3));
  const hex = colorToInt(next.substring(3)).toString(16);

  // NOTE: padStart could be used here but it breaks Node 6 compat
  // https://github.com/ricokahler/color2k/issues/351
  let prefix = '';
  for (let i = 0; i < 6 - hex.length; i++) {
    prefix += '0';
  }
  acc[key] = `${prefix}${hex}`;
  return acc;
}, {});

/**
 * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
 */
function nameToHex(color) {
  const normalizedColorName = color.toLowerCase().trim();
  const result = compressedColorMap[hash(normalizedColorName)];
  if (!result) throw new ColorError$1(color);
  return `#${result}`;
}
const r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
const reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
const hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
const namedColorRegex = /^[a-z]+$/i;
const roundColor = color => {
  return Math.round(color * 255);
};
const hslToRgb = (hue, saturation, lightness) => {
  let l = lightness / 100;
  if (saturation === 0) {
    // achromatic
    return [l, l, l].map(roundColor);
  }

  // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
  const huePrime = (hue % 360 + 360) % 360 / 60;
  const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);
  const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
  let red = 0;
  let green = 0;
  let blue = 0;
  if (huePrime >= 0 && huePrime < 1) {
    red = chroma;
    green = secondComponent;
  } else if (huePrime >= 1 && huePrime < 2) {
    red = secondComponent;
    green = chroma;
  } else if (huePrime >= 2 && huePrime < 3) {
    green = chroma;
    blue = secondComponent;
  } else if (huePrime >= 3 && huePrime < 4) {
    green = secondComponent;
    blue = chroma;
  } else if (huePrime >= 4 && huePrime < 5) {
    red = secondComponent;
    blue = chroma;
  } else if (huePrime >= 5 && huePrime < 6) {
    red = chroma;
    blue = secondComponent;
  }
  const lightnessModification = l - chroma / 2;
  const finalRed = red + lightnessModification;
  const finalGreen = green + lightnessModification;
  const finalBlue = blue + lightnessModification;
  return [finalRed, finalGreen, finalBlue].map(roundColor);
};

// taken from:
// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js

/**
 * Returns a number (float) representing the luminance of a color.
 */
function getLuminance(color) {
  if (color === 'transparent') return 0;
  function f(x) {
    const channel = x / 255;
    return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
  }
  const [r, g, b] = parseToRgba(color);
  return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
}

/**
 * Takes in rgba parts and returns an rgba string
 *
 * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive
 * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive
 * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive
 * @param alpha Percentage of opacity, given as a decimal between 0 and 1
 */
function rgba(red, green, blue, alpha) {
  return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;
}

/**
 * Mixes two colors together. Taken from sass's implementation.
 */
function mix(color1, color2, weight) {
  const normalize = (n, index) =>
  // 3rd index is alpha channel which is already normalized
  index === 3 ? n : n / 255;
  const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);
  const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);

  // The formula is copied from the original Sass implementation:
  // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
  const alphaDelta = a2 - a1;
  const normalizedWeight = weight * 2 - 1;
  const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);
  const weight2 = (combinedWeight + 1) / 2;
  const weight1 = 1 - weight2;
  const r = (r1 * weight1 + r2 * weight2) * 255;
  const g = (g1 * weight1 + g2 * weight2) * 255;
  const b = (b1 * weight1 + b2 * weight2) * 255;
  const a = a2 * weight + a1 * (1 - weight);
  return rgba(r, g, b, a);
}

/**
 * An alternative function to `readableColor`. Returns whether or not the 
 * readable color (i.e. the color to be place on top the input color) should be
 * black.
 */
function readableColorIsBlack(color) {
  return getLuminance(color) > 0.179;
}

function n(n,r,t){return {r:255*t(n.r/255,r.r/255),g:255*t(n.g/255,r.g/255),b:255*t(n.b/255,r.b/255)}}function t(n,r){return n*r}function u(n,r){return n+r-n*r}function i(n,r){return a(r,n)}function a(n,r){return r<=.5?t(n,2*r):u(n,2*r-1)}function M(n,r,t){return Math.min(Math.max(n||0,r),t)}function m(n){return {r:M(n.r,0,255),g:M(n.g,0,255),b:M(n.b,0,255),a:M(n.a,0,1)}}function d(n){return {r:255*n.r,g:255*n.g,b:255*n.b,a:n.a}}function p(n){return {r:n.r/255,g:n.g/255,b:n.b/255,a:n.a}}function v(n,r){void 0===r&&(r=0);var t=Math.pow(10,r);return {r:Math.round(n.r*t)/t,g:Math.round(n.g*t)/t,b:Math.round(n.b*t)/t,a:n.a}}function x(n,r,t,u,i,o){return (1-r/t)*u+r/t*Math.round((1-n)*i+n*o)}function O(n,r,t,u,i){void 0===i&&(i={unitInput:!1,unitOutput:!1,roundOutput:!0}),i.unitInput&&(n=d(n),r=d(r)),n=m(n);var o=(r=m(r)).a+n.a-r.a*n.a,e=t(n,r,u),c=m({r:x(n.a,r.a,o,n.r,r.r,e.r),g:x(n.a,r.a,o,n.g,r.g,e.g),b:x(n.a,r.a,o,n.b,r.b,e.b),a:o});return c=i.unitOutput?p(c):i.roundOutput?v(c):function(n){return v(n,9)}(c),c}function D(r,t){return O(r,t,n,i)}

const isColor = strColor => {
    const s = new Option().style;
    s.color = strColor;
    return s.color !== '';
};
const toKebabCase = (pascal) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();
// This function handles arrays and objects
const buildVars = (prev, obj) => {
    let resp = {};
    for (const k in obj) {
        const name = `${prev}-${toKebabCase(k)}`;
        if (typeof obj[k] === 'object' && obj[k] !== null) {
            resp = Object.assign(Object.assign({}, resp), buildVars(name, obj[k]));
        }
        else {
            resp[name] = obj[k];
        }
    }
    return resp;
};
const getCssColors = (customPalette) => buildVars('--cpsl-color', customPalette);
const getCssBorderRadii = (customBorderRadii) => buildVars('--cpsl-border-radius', customBorderRadii);
const overlayMix = (baseColor, overlayColor) => {
    const baseRGBA = parseToRgba(baseColor);
    const overlayRGBA = parseToRgba(overlayColor);
    const finalRGBA = D({ r: baseRGBA[0], g: baseRGBA[1], b: baseRGBA[2], a: 0.1 }, { r: overlayRGBA[0], g: overlayRGBA[1], b: overlayRGBA[2], a: overlayRGBA[3] });
    return rgba(finalRGBA.r, finalRGBA.g, finalRGBA.b, finalRGBA.a);
};

const generateBorderRadii = ({ borderRadius, customBorderRadii }) => {
    let mediumRadius, largeRadius, checkboxRadius = 4;
    const fullRadius = 1000;
    let isFull = false;
    let isNone = false;
    switch (borderRadius) {
        case 'none': {
            isNone = true;
            mediumRadius = 0;
            largeRadius = 0;
            checkboxRadius = 0;
            break;
        }
        case 'xs': {
            mediumRadius = 2;
            largeRadius = 4;
            checkboxRadius = 2;
            break;
        }
        case 'sm': {
            mediumRadius = 4;
            largeRadius = 8;
            break;
        }
        case 'md': {
            mediumRadius = 8;
            largeRadius = 16;
            break;
        }
        case 'xl': {
            mediumRadius = 16;
            largeRadius = 32;
            break;
        }
        case 'full': {
            mediumRadius = 24;
            largeRadius = 32;
            isFull = true;
            break;
        }
        default:
        case 'lg': {
            mediumRadius = 12;
            largeRadius = 24;
            break;
        }
    }
    document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isNone ? 0 : fullRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-tertiary-button', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${mediumRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-card', `${largeRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${largeRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${checkboxRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);
    document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);
    if (customBorderRadii) {
        const cssBorderRadiiVars = getCssBorderRadii(customBorderRadii);
        Object.entries(cssBorderRadiiVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
    }
};

const FONT_NAME_MAP = {
    body2XS: 'body-2xs',
    bodyXS: 'body-xs',
    bodyS: 'body-s',
    bodyM: 'body-m',
    bodyL: 'body-l',
    bodyXL: 'body-xl',
    headingXS: 'heading-xs',
    headingS: 'heading-s',
    headingM: 'heading-m',
    headingL: 'heading-l',
    headingXL: 'heading-xl',
    heading2XL: 'heading-2xl',
};
const generateFont = ({ font, customFontSizes }) => {
    if (font) {
        document.documentElement.style.setProperty('--cpsl-default-font', font);
    }
    Object.entries(FONT_NAME_MAP).forEach(([key, value]) => {
        if (customFontSizes === null || customFontSizes === void 0 ? void 0 : customFontSizes[key]) {
            document.documentElement.style.setProperty(`--cpsl-font-size-${value}`, customFontSizes[key]);
        }
        else {
            document.documentElement.style.removeProperty(`--cpsl-font-size-${value}`);
        }
    });
};

const generatePalette = ({ foregroundColor, backgroundColor, accentColor, isDarkTheme, customPalette, }) => {
    if (!foregroundColor || !isColor(foregroundColor)) {
        foregroundColor = DEFAULT_THEME.foregroundColor;
    }
    if (!backgroundColor || !isColor(backgroundColor)) {
        backgroundColor = DEFAULT_THEME.backgroundColor;
    }
    if (!Boolean(accentColor) || !isColor(accentColor)) {
        accentColor = foregroundColor;
    }
    const isDarkAccent = Boolean(accentColor) ? !readableColorIsBlack(accentColor) : false;
    const palette = {
        foregroundColors: [],
        backgroundColors: [],
        accentColors: [],
    };
    const backgroundMixColor = isDarkTheme ? '#FFFFFF' : '#000000';
    const foregroundMixColor = isDarkTheme ? '#000000' : '#FFFFFF';
    const accentMixColor = isDarkAccent ? '#FFFFFF' : '#000000';
    COLOR_MIXES.forEach(value => {
        palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));
        palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));
        palette.accentColors.push(mix(accentColor, accentMixColor, value));
    });
    // BACKGROUND
    document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);
    document.documentElement.style.setProperty('--cpsl-color-background-4', palette.backgroundColors[1]);
    document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[2]);
    document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[3]);
    document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[4]);
    document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[5]);
    document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[6]);
    document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[7]);
    document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[8]);
    // FOREGROUND
    document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-4', palette.foregroundColors[1]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[2]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[3]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[4]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[5]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);
    document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);
    // ACCENT
    document.documentElement.style.setProperty('--cpsl-color-accent-0', palette.accentColors[0]);
    document.documentElement.style.setProperty('--cpsl-color-accent-4', palette.accentColors[1]);
    document.documentElement.style.setProperty('--cpsl-color-accent-8', palette.accentColors[2]);
    document.documentElement.style.setProperty('--cpsl-color-accent-16', palette.accentColors[3]);
    document.documentElement.style.setProperty('--cpsl-color-accent-32', palette.accentColors[4]);
    document.documentElement.style.setProperty('--cpsl-color-accent-48', palette.accentColors[5]);
    document.documentElement.style.setProperty('--cpsl-color-accent-64', palette.accentColors[6]);
    document.documentElement.style.setProperty('--cpsl-color-accent-80', palette.accentColors[7]);
    document.documentElement.style.setProperty('--cpsl-color-accent-96', palette.accentColors[8]);
    // CONTRAST
    document.documentElement.style.setProperty('--cpsl-color-contrast', isDarkTheme ? '#FFFFFF' : '#000000');
    const utilityLightMixColor = '#FFFFFF';
    const utilityLightMixValue = 0.72;
    // UTILITY
    const red = overlayMix(foregroundColor, UTILITY_COLORS.red);
    const yellow = overlayMix(foregroundColor, UTILITY_COLORS.yellow);
    const green = overlayMix(foregroundColor, UTILITY_COLORS.green);
    document.documentElement.style.setProperty('--cpsl-color-utility-red', red);
    document.documentElement.style.setProperty('--cpsl-color-utility-yellow', yellow);
    document.documentElement.style.setProperty('--cpsl-color-utility-green', green);
    document.documentElement.style.setProperty('--cpsl-color-utility-red-light', mix(red, utilityLightMixColor, utilityLightMixValue));
    document.documentElement.style.setProperty('--cpsl-color-utility-yellow-light', mix(yellow, utilityLightMixColor, utilityLightMixValue));
    document.documentElement.style.setProperty('--cpsl-color-utility-green-light', mix(green, utilityLightMixColor, utilityLightMixValue));
    if (customPalette) {
        const cssColorVars = getCssColors(customPalette);
        Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
    }
};

/**
 * Generates css theme variables.
 * @returns @boolean Whether background is dark or not.
 */
const generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, accentColor, darkForegroundColor, darkBackgroundColor, darkAccentColor, mode = 'light', font, customPalette, borderRadius, customFontSizes, customBorderRadii, }) => {
    const isDarkTheme = mode === 'dark';
    generatePalette({
        foregroundColor: isDarkTheme ? (darkForegroundColor !== null && darkForegroundColor !== void 0 ? darkForegroundColor : foregroundColor) : foregroundColor,
        backgroundColor: isDarkTheme ? (darkBackgroundColor !== null && darkBackgroundColor !== void 0 ? darkBackgroundColor : backgroundColor) : backgroundColor,
        accentColor: isDarkTheme ? (darkAccentColor !== null && darkAccentColor !== void 0 ? darkAccentColor : accentColor) : accentColor,
        customPalette,
        isDarkTheme,
    });
    generateFont({ font, customFontSizes });
    generateBorderRadii({ borderRadius, customBorderRadii });
};

export { generateTheme };

//# sourceMappingURL=index.js.map