decord/source/modules/collectibles/createUseCollectiblesShopStyles.tsx

114 lines
4 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9731
2026-07-27 11:26:19 +00:00
// Function ID: 75806
2026-07-20 16:05:17 +00:00
// Name: getMidpointColor
2026-07-25 08:10:48 +00:00
// Dependencies: [57, 4123, 7927, 5780, 624, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 9731 (getMidpointColor)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function getMidpointColor(toRgb, toRgb2) {
let tmp4;
let tmp5;
let tmp6;
const toRgbResult = toRgb.toRgb();
const toRgbResult1 = toRgb2.toRgb();
const items = [, , ];
({ r: arr[0], g: arr[1], b: arr[2] } = toRgbResult);
const items1 = [, , ];
({ r: arr2[0], g: arr2[1], b: arr2[2] } = toRgbResult1);
2026-07-25 08:10:48 +00:00
const obj = require(7927) /* getProfileTheme */;
[tmp4, tmp5, tmp6] = callback(require(7927) /* getProfileTheme */.getValueInColorGradientByPercentage(items, items1, 50), 3);
return importDefault(5780)({ r, g, b });
2026-07-20 16:05:17 +00:00
}
function getBackgroundColors(dark) {
if (0 !== arg1.length) {
if (1 === arg1.length) {
let obj = { primary: arg1[0], secondary: arg1[0] };
const first = arg1[0];
obj.border = first.setAlpha(0.4);
const first1 = arg1[0];
obj.label = first1.isLight() ? dark.dark : dark.light;
} else {
obj = {};
[obj6.primary, obj6.secondary] = arg1;
let tmp;
if (arg1.length > 2) {
tmp = arg1[2];
}
obj.tertiary = tmp;
obj = getMidpointColor(arg1[0], arg1[1]);
obj.border = obj.setAlpha(0.4);
obj.label = getMidpointColor(arg1[0], arg1[1]).isLight() ? dark.dark : dark.light;
return obj;
}
}
}
function getButtonColors(dark) {
if (0 !== arg1.length) {
if (1 === arg1.length) {
let obj = { primary: arg1[0], secondary: arg1[0] };
const first = arg1[0];
obj.text = first.isLight() ? dark.dark : dark.light;
} else {
obj = {};
[obj.primary, obj.secondary] = arg1;
obj.text = getMidpointColor(arg1[0], arg1[1]).isLight() ? dark.dark : dark.light;
return obj;
}
}
}
function desaturate(toHsl) {
let h;
let l;
let s;
({ h, s, l } = toHsl.toHsl());
2026-07-25 08:10:48 +00:00
return importDefault(5780)({ h, s: s * arg1, l });
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("getProfileTheme").fileFinishedImporting("modules/collectibles/createUseCollectiblesShopStyles.tsx");
2026-07-20 16:05:17 +00:00
export default function createUseCollectiblesShopStyles(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return (backgroundColors) => {
2026-07-23 10:11:24 +00:00
let obj = callback(outer1_2[4]);
const items = [outer1_4];
const stateFromStores = obj.useStateFromStores(items, () => outer2_4.saturation);
2026-07-20 16:05:17 +00:00
if (null == backgroundColors) {
return {};
} else {
2026-07-23 10:11:24 +00:00
obj = { backgroundColors: outer1_6(stateFromStores, backgroundColors.backgroundColors), buttonColors: outer1_7(stateFromStores, backgroundColors.buttonColors), confettiColors: backgroundColors.confettiColors };
2026-07-20 16:05:17 +00:00
if (1 === stateFromStores) {
obj = {};
const merged = Object.assign(obj);
let obj1 = obj;
} else {
obj1 = {};
let tmp6;
if (null != obj.backgroundColors) {
2026-07-23 10:11:24 +00:00
const obj2 = { primary: outer1_8(obj.backgroundColors.primary, stateFromStores), secondary: outer1_8(obj.backgroundColors.secondary, stateFromStores) };
2026-07-20 16:05:17 +00:00
let tmp3;
if (null != obj.backgroundColors.tertiary) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1_8(obj.backgroundColors.tertiary, stateFromStores);
2026-07-20 16:05:17 +00:00
}
obj2.tertiary = tmp3;
2026-07-23 10:11:24 +00:00
obj2.border = outer1_8(obj.backgroundColors.border, stateFromStores);
obj2.label = outer1_8(obj.backgroundColors.label, stateFromStores);
2026-07-20 16:05:17 +00:00
tmp6 = obj2;
}
obj1.backgroundColors = tmp6;
let tmp7;
if (null != obj.buttonColors) {
2026-07-23 10:11:24 +00:00
const obj3 = { primary: outer1_8(obj.buttonColors.primary, stateFromStores), secondary: outer1_8(obj.buttonColors.secondary, stateFromStores), text: outer1_8(obj.buttonColors.text, stateFromStores) };
2026-07-20 16:05:17 +00:00
tmp7 = obj3;
}
obj1.buttonColors = tmp7;
const confettiColors = obj.confettiColors;
2026-07-23 10:11:24 +00:00
obj1.confettiColors = confettiColors.map((arg0) => outer2_8(arg0, stateFromStores));
2026-07-20 16:05:17 +00:00
}
return obj1;
}
};
};