import {Center, Skeleton, Text} from 'native-base';
import {
  InterfaceTextProps,
  ITextProps,
} from 'native-base/lib/typescript/components/primitives/Text/types';
import {ColorSchemeType} from 'native-base/lib/typescript/components/types';
import {RefAttributes} from 'react';

export function TextSkeleton(
  props: {SkeletonProps: any} & JSX.IntrinsicAttributes &
    InterfaceTextProps<ITextProps> & {
      variant?: unknown;
      size?: unknown;
      colorScheme?: ColorSchemeType;
    } & RefAttributes<unknown>,
) {
  console.log('props.children', props.children);
  if (props.children === undefined) {
    return <Skeleton.Text marginY={1} {...props.SkeletonProps}></Skeleton.Text>;
  }

  return <Text {...props} />;
}
