import { jsx } from "react/jsx-runtime";
import "react";
import { cn } from "../utils/cn.js";
const getVariantClasses = (type, size) => {
  if (type === "headline") {
    const headlineMap = {
      lg: "headline-lg",
      md: "headline-md",
      sm: "headline-sm"
    };
    return headlineMap[size] || headlineMap.md;
  } else {
    const defaultMap = {
      lg: "text-lg",
      base: "text-base",
      sm: "text-sm"
    };
    return defaultMap[size] || defaultMap.base;
  }
};
const getDefaultSize = (type) => {
  return type === "headline" ? "md" : "base";
};
const Text = ({
  type = "default",
  size,
  as,
  className,
  children,
  ...props
}) => {
  const actualSize = size || getDefaultSize(type);
  const variantClasses = getVariantClasses(type, actualSize);
  const Component = as || "p";
  return /* @__PURE__ */ jsx(Component, { className: cn(variantClasses, className), ...props, children });
};
Text.displayName = "Text";
export {
  Text
};
