import React from "react";
import type { ViewStyle } from "react-native";
import Text from "./Text";
import type { TSTextProps } from "./types";

function TSText({
  accessibilityLabel,
  children,
  style,
  mode,
  decoration,
  position,
  color,
  onPress,
  onRef,
  link,
  size,
  underline,
  numberOfLines,
  onLayout,
  ...props
}: TSTextProps) {
  return (
    <Text
      accessibilityLabel={accessibilityLabel}
      // eslint-disable-next-line
      children={children}
      style={style as ViewStyle}
      mode={mode}
      decoration={decoration}
      position={position}
      color={color}
      onPress={onPress}
      // eslint-disable-next-line
      onRef={onRef}
      link={link}
      size={size}
      underline={underline}
      numberOfLines={numberOfLines}
      onLayout={onLayout}
      {...props}
    />
  );
}

export default TSText;
