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

47 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 8294
// Function ID: 8295
2026-07-25 08:10:48 +00:00
// Name: useCutoutBackgroundColor
2026-08-08 06:10:11 +00:00
// Dependencies: [19, 21, 689, 8295, 712, 4005, 2]
2026-07-29 08:29:29 +00:00
// Exports: CutoutBackgroundProvider, useCutoutBackgroundColor
2026-07-20 16:05:17 +00:00
2026-08-08 06:10:11 +00:00
// Module 8294 (useCutoutBackgroundColor)
2026-07-29 08:29:29 +00:00
import importAllResult from "noop";
2026-07-25 08:10:48 +00:00
import { jsx } from "jsxProd";
2026-07-23 10:11:24 +00:00
2026-07-25 08:10:48 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
let context = importAllResult.createContext(undefined);
const result = require("n").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);
const internal = importDefault(712).internal;
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-08 06:10:11 +00:00
value = require(8295) /* flattenColorOverOpaqueBackground */.flattenColorOverOpaqueBackground(token, context);
const tmp6Result = require(8295) /* flattenColorOverOpaqueBackground */;
2026-07-25 08:10:48 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj2 = importDefault(689)(token);
} 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
};