import baseStyled from "../../styled";
import { compose, fontSize, fontWeight, textAlign, lineHeight, letterSpacing, system, } from "styled-system";
import fontFamily from "../../../styles/styled/fontFamily";
import { textVariantStyle } from "./styles";
const uppercase = system({
    uppercase: {
        property: "textTransform",
        transform: value => (value ? "uppercase" : "none"),
    },
});
const Text = baseStyled.span.attrs(({ variant = "body", fontSize, color }) => ({
    fontSize: fontSize ? fontSize : variant,
    color: color || "neutral.c100",
})) `
  font-weight: 500;
  white-space: ${props => { var _a; return (_a = props.whiteSpace) !== null && _a !== void 0 ? _a : "normal"; }};
  ${(p) => textVariantStyle[p.variant || "body"]}
  ${compose(uppercase, lineHeight, fontFamily, fontSize, textAlign, fontWeight, letterSpacing, system({
    textOverflow: true,
}))}
  ${p => (p.textTransform ? `text-transform: ${p.textTransform};` : "")}
`;
export default Text;
//# sourceMappingURL=index.js.map