decord/source/4495_context.js

32 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 4495
// Function ID: 39673
2026-07-20 16:05:17 +00:00
// Name: context
2026-07-23 10:11:24 +00:00
// Dependencies: [31]
2026-07-20 16:05:17 +00:00
// Exports: useEdgeInsetApplication
2026-07-25 08:10:48 +00:00
// Module 4495 (context)
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
let context = importAllResult.createContext({ leftDisabled: false, rightDisabled: false, bottomDisabled: false });
2026-07-20 16:05:17 +00:00
export const EdgeInsetApplicationContext = context;
2026-07-23 10:11:24 +00:00
export const useEdgeInsetApplication = function useEdgeInsetApplication(arg0, context, arg2) {
2026-07-20 16:05:17 +00:00
let bottomDisabled;
let leftDisabled;
let rightDisabled;
2026-07-23 10:11:24 +00:00
context = leftDisabled.useContext(rightDisabled);
2026-07-20 16:05:17 +00:00
({ leftDisabled, rightDisabled, bottomDisabled } = context);
if (!leftDisabled) {
leftDisabled = arg0;
}
if (!rightDisabled) {
2026-07-23 10:11:24 +00:00
rightDisabled = context;
2026-07-20 16:05:17 +00:00
}
if (!bottomDisabled) {
bottomDisabled = arg2;
}
const items = [leftDisabled, rightDisabled, bottomDisabled];
const obj = { consumeLeftInset: !leftDisabled, consumeRightInset: !rightDisabled, consumeBottomInset: !bottomDisabled, nextContextValue: leftDisabled.useMemo(() => ({ leftDisabled, rightDisabled, bottomDisabled }), items) };
return obj;
};