import React, { useState } from 'react';
import { useEssentials } from '@wix/fe-essentials/react';
import { CairoProvider } from '../providers';
import { buildWixPatternsEssentials } from './buildWixPatternsEssentials';
export function WixPatternsEssentialsProvider({ value, children, localCache, contextType, }) {
    const essentials = useEssentials();
    const [wixPatternsEssentials] = useState(() => buildWixPatternsEssentials(essentials, {
        overrides: value,
    }));
    return (React.createElement(CairoProvider, { value: wixPatternsEssentials, localCache: localCache, contextType: contextType }, children));
}
//# sourceMappingURL=WixPatternsEssentialsProvider.js.map