33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
// Module ID: 4647
|
|
// Function ID: 4648
|
|
// Name: context
|
|
// Dependencies: [19]
|
|
// Exports: useEdgeInsetApplication
|
|
|
|
// Module 4647 (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;
|
|
};
|