decord/source/design/components/Icon/native/CutoutBackgroundContext.tsx

50 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8442
// Function ID: 8443
2026-07-25 08:10:48 +00:00
// Name: useCutoutBackgroundColor
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 21, 689, 8443, 712, 4100, 2]
2026-07-29 08:29:29 +00:00
// Exports: CutoutBackgroundProvider, useCutoutBackgroundColor
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 8442 (useCutoutBackgroundColor)
import nDefault from "n" /* 689 */;
import ThemesDefault from "Themes" /* 712 */;
import flattenColorOverOpaqueBackground from "flattenColorOverOpaqueBackground" /* 8443 */;
import importAllResult from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
let context = importAllResult.createContext(undefined);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/Icon/native/CutoutBackgroundContext.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const useCutoutBackgroundColor = function useCutoutBackgroundColor() {
return importAllResult.useContext(closure_5);
};
export const CutoutBackgroundProvider = function CutoutBackgroundProvider(children) {
const backgroundColor = children.backgroundColor;
const context = importAllResult.useContext(closure_5);
2026-08-24 06:08:38 +00:00
const internal = ThemesDefault.internal;
2026-07-29 08:29:29 +00:00
if (internal.isSemanticColor(backgroundColor)) {
const tmp5 = backgroundColor;
}
let token = null;
2026-07-25 08:10:48 +00:00
if (null !== backgroundColor) {
2026-07-29 08:29:29 +00:00
token = obj.useToken(tmp5);
2026-08-04 21:03:28 +00:00
if (typeof backgroundColor === "string") {
2026-07-29 08:29:29 +00:00
token = backgroundColor;
2026-07-25 08:10:48 +00:00
}
}
2026-07-29 08:29:29 +00:00
if (null != token) {
let value = token;
if (1 !== obj2.alpha()) {
if (null != context) {
2026-08-24 06:08:38 +00:00
value = flattenColorOverOpaqueBackground.flattenColorOverOpaqueBackground(token, context);
const tmp6Result = flattenColorOverOpaqueBackground;
2026-07-25 08:10:48 +00:00
}
}
2026-08-24 06:08:38 +00:00
obj2 = nDefault(token);
2026-07-29 08:29:29 +00:00
} else if (undefined === token) {
value = context;
2026-07-25 08:10:48 +00:00
}
2026-07-29 08:29:29 +00:00
return <closure_5.Provider value={value}>{arg0.children}</closure_5.Provider>;
2026-07-25 08:10:48 +00:00
};