// @flow
import type { SearchInputFieldProps } from './search-input-field.proptypes';

/**
 * No icon on the left - it would be on the right
 */
export const getSearchInputFocusedLeftPadding = ({
  large,
}: SearchInputFieldProps) => (large ? '30px' : '20px');

/**
 * Accommodates the icon
 */
export const getSearchInputLeftPadding = (props: SearchInputFieldProps) => {
  const { value, large } = props;
  if (value) return getSearchInputFocusedLeftPadding(props);
  return large ? '50px' : '40px';
};
