49 lines
1.7 KiB
TypeScript
49 lines
1.7 KiB
TypeScript
// Module ID: 8448
|
|
// Function ID: 8449
|
|
// Name: useCutoutBackgroundColor
|
|
// Dependencies: [19, 21, 689, 8449, 712, 4101, 2]
|
|
// Exports: CutoutBackgroundProvider, useCutoutBackgroundColor
|
|
|
|
// Module 8448 (useCutoutBackgroundColor)
|
|
import nDefault from "n" /* 689 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import flattenColorOverOpaqueBackground from "flattenColorOverOpaqueBackground" /* 8449 */;
|
|
import importAllResult from "noop" /* 19 */;
|
|
import { jsx } from "jsxProd" /* 21 */;
|
|
|
|
require = arg1;
|
|
let c3 = importAllResult;
|
|
let context = importAllResult.createContext(undefined);
|
|
const result = require("set").fileFinishedImporting("design/components/Icon/native/CutoutBackgroundContext.tsx");
|
|
|
|
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 = ThemesDefault.internal;
|
|
if (internal.isSemanticColor(backgroundColor)) {
|
|
const tmp5 = backgroundColor;
|
|
}
|
|
let token = null;
|
|
if (null !== backgroundColor) {
|
|
token = obj.useToken(tmp5);
|
|
if (typeof backgroundColor === "string") {
|
|
token = backgroundColor;
|
|
}
|
|
}
|
|
if (null != token) {
|
|
let value = token;
|
|
if (1 !== obj2.alpha()) {
|
|
if (null != context) {
|
|
value = flattenColorOverOpaqueBackground.flattenColorOverOpaqueBackground(token, context);
|
|
const tmp6Result = flattenColorOverOpaqueBackground;
|
|
}
|
|
}
|
|
obj2 = nDefault(token);
|
|
} else if (undefined === token) {
|
|
value = context;
|
|
}
|
|
return <closure_5.Provider value={value}>{arg0.children}</closure_5.Provider>;
|
|
};
|