/*!
 * React Native Globalize
 *
 * Copyright 2015-2020 Josh Swan
 * Released under the MIT license
 * https://github.com/joshswan/react-native-globalize/blob/master/LICENSE
 */
import React, { useContext } from 'react';
import { GlobalizeContext } from '../context';
export const withGlobalize = (Component) => (props) => {
    const globalize = useContext(GlobalizeContext);
    return React.createElement(Component, Object.assign({}, props, { globalize: globalize }));
};
