const formatValue = (tinyColor) => {
  if (!tinyColor) {
    return '';
  }
  const { r, g, b, a } = tinyColor.toRgb();
  return `${r} ${g} ${b} / ${a}`;
};
export const OverridableRingTokens = [
  {
    name: 'ring-input-focus',
    overrideGetter: (overrideColors, tinycolor) => {
      const overrideBaseColor = overrideColors['actionColor'];
      if (!overrideBaseColor) {
        return '';
      }
      const baseColor = overrideBaseColor
        ? tinycolor(overrideBaseColor)
        : undefined;
      let value = baseColor
        ? baseColor.clone()
        : undefined;
      value = value === null || value === void 0 ? void 0 : value.setAlpha(0.25);
      return formatValue(value);
    },
  },
  {
    name: 'dark-ring-input-focus',
  },
  {
    name: 'ring-action-focus',
    overrideGetter: (overrideColors, tinycolor) => {
      const overrideBaseColor = overrideColors['actionColor'];
      if (!overrideBaseColor) {
        return '';
      }
      const baseColor = overrideBaseColor
        ? tinycolor(overrideBaseColor)
        : undefined;
      let value = baseColor
        ? baseColor.clone()
        : undefined;
      value = value === null || value === void 0 ? void 0 : value.setAlpha(0.25);
      return formatValue(value);
    },
  },
  {
    name: 'dark-ring-action-focus',
  },
];
