import { theme as defaultTheme } from '@bigcommerce/big-design-theme';
import styled from 'styled-components';
export function createStyledFlagIcon(FlagIcon) {
  const StyledFlagIcon = /*#__PURE__*/styled(FlagIcon).withConfig({
    displayName: "base__StyledFlagIcon",
    componentId: "sc-1uryeck-0"
  })(["", ""], _ref => {
    let {
      size,
      theme
    } = _ref;
    return size && {
      width: typeof size === 'number' ? theme.helpers.remCalc(size) : theme.spacing[size]
    };
  });
  StyledFlagIcon.defaultProps = {
    size: 'xLarge',
    theme: defaultTheme
  };
  return StyledFlagIcon;
}