"use strict";

import { forwardRef } from "react";
import { Pressable } from "react-native";
import { useIOTheme } from "../../context";
import { IOText } from "./IOText";
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * `LabelMini` typographic style
 */
export const LabelMini = /*#__PURE__*/forwardRef(({
  weight: customWeight,
  color: customColor,
  asLink,
  accessibilityRole = "link",
  textStyle: customTextStyle,
  onPress,
  ...props
}, ref) => {
  const theme = useIOTheme();
  const defaultColor = asLink ? theme["interactiveElem-default"] : theme["textBody-tertiary"];
  const LabelMiniProps = {
    ...props,
    dynamicTypeRamp: "footnote" /* iOS only */,
    weight: customWeight || "Semibold",
    size: 12,
    lineHeight: 18,
    color: customColor ?? defaultColor,
    ...(asLink ? {
      accessibilityRole,
      textStyle: customTextStyle ?? {
        textDecorationLine: "underline"
      }
    } : {})
  };
  if (asLink) {
    return /*#__PURE__*/_jsx(Pressable, {
      onPress: onPress,
      ref: ref,
      accessibilityRole: accessibilityRole,
      children: /*#__PURE__*/_jsx(IOText, {
        ...LabelMiniProps,
        children: props.children
      })
    });
  }
  return /*#__PURE__*/_jsx(IOText, {
    ref: ref,
    ...LabelMiniProps,
    children: props.children
  });
});
//# sourceMappingURL=LabelMini.js.map