"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setLightenColor = exports.setBrightenColor = exports.setAlphaColor = exports.scrollBarPrimary = exports.scrollBar = void 0;
var _tinycolor = require("@ctrl/tinycolor");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
// https://tinycolor.vercel.app/
/**
 * 设置颜色透明度
 * @param {string} colorKey 色值
 * @param { number | string} opacity 透明度
 *
 * @return string
 */
var setAlphaColor = exports.setAlphaColor = function setAlphaColor(colorKey, opacity) {
  return new _tinycolor.TinyColor(colorKey).setAlpha(opacity || 1).toRgbString();
};
var setLightenColor = exports.setLightenColor = function setLightenColor(colorKey, amount) {
  return new _tinycolor.TinyColor(colorKey).lighten(amount || 10).toString();
};
var setBrightenColor = exports.setBrightenColor = function setBrightenColor(colorKey, amount) {
  return new _tinycolor.TinyColor(colorKey).brighten(amount || 10).toString();
};
var scrollBar = exports.scrollBar = function scrollBar(token) {
  return _defineProperty(_defineProperty(_defineProperty({}, '&::-webkit-scrollbar-track-piece', {
    background: new _tinycolor.TinyColor('#c1c1c1').setAlpha(0.02).toRgbString() // new TinyColor(token.colorPrimary).setAlpha(0.1)
  }), '&::-webkit-scrollbar', {
    width: '8px',
    height: '8px'
  }), '&::-webkit-scrollbar-thumb', {
    background: new _tinycolor.TinyColor('#c1c1c1').setAlpha(0.5).toRgbString(),
    // new TinyColor(token.colorPrimary).setAlpha(0.5),
    borderRadius: '20px'
  });
};
var scrollBarPrimary = exports.scrollBarPrimary = function scrollBarPrimary(token) {
  return _defineProperty(_defineProperty(_defineProperty({}, '&::-webkit-scrollbar-track-piece', {
    background: new _tinycolor.TinyColor(token.colorPrimary).setAlpha(0.1).toRgbString() // new TinyColor(token.colorPrimary).setAlpha(0.1)
  }), '&::-webkit-scrollbar', {
    width: '8px',
    height: '8px'
  }), '&::-webkit-scrollbar-thumb', {
    background: new _tinycolor.TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString(),
    // new TinyColor(token.colorPrimary).setAlpha(0.5),
    borderRadius: '20px'
  });
};