import React from 'react';
import { useNativeBaseConfig } from '../core/NativeBaseContext';
import { resolveValueWithBreakpoint } from './useThemeProps/resolveValueWithBreakpoint';
import { useTheme } from './../hooks/useTheme';
export const useBreakpointResolvedProps = props => {
  const currentBreakpoint = useNativeBaseConfig('useBreakpointResolvedProps').currentBreakpoint;
  const theme = useTheme();
  const newProps = React.useMemo(() => {
    let newProps = {};

    for (let key in props) {
      const rawValue = props[key];
      const value = resolveValueWithBreakpoint(rawValue, theme.breakpoints, currentBreakpoint, key);
      newProps[key] = value;
    }

    return newProps;
  }, [props, currentBreakpoint, theme.breakpoints]); // if (name === 'Stack') {
  //   // console.log(key, value, 'component theme');
  //   return {};
  // }

  return newProps;
};
//# sourceMappingURL=useBreakpointResolvedProps.js.map