decord/source/4706_context.js
2026-08-12 06:57:52 +00:00

33 lines
1.1 KiB
JavaScript

// Module ID: 4706
// Function ID: 4707
// Name: context
// Dependencies: [19]
// Exports: useEdgeInsetApplication
// Module 4706 (context)
import importAllResult from "noop";
let c0 = importAllResult;
let context = importAllResult.createContext({ leftDisabled: false, rightDisabled: false, bottomDisabled: false });
export const EdgeInsetApplicationContext = context;
export const useEdgeInsetApplication = function useEdgeInsetApplication(flag, flag2, flag3) {
let bottomDisabled;
let leftDisabled;
let rightDisabled;
let obj = leftDisabled;
const context = leftDisabled.useContext(rightDisabled);
({ leftDisabled, rightDisabled, bottomDisabled } = context);
if (!leftDisabled) {
leftDisabled = flag;
}
if (!rightDisabled) {
rightDisabled = flag2;
}
if (!bottomDisabled) {
bottomDisabled = flag3;
}
const items = [leftDisabled, rightDisabled, bottomDisabled];
obj = { consumeLeftInset: !leftDisabled, consumeRightInset: !rightDisabled, consumeBottomInset: !bottomDisabled, nextContextValue: obj.useMemo(() => ({ leftDisabled, rightDisabled, bottomDisabled }), items) };
return obj;
};