import { __assign } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useMemo } from 'react';
export var DisabledContext = createContext({
    value: false,
});
DisabledContext.displayName = 'DisabledContext';
export var Disabled = function (_a) {
    var _b = _a.value, value = _b === void 0 ? true : _b, children = _a.children;
    var ctx = useMemo(function () { return ({
        value: value,
    }); }, [value]);
    return (_jsx(DisabledContext.Provider, __assign({ value: ctx }, { children: children }), void 0));
};
