import { Animated, TextStyle, ViewStyle } from 'react-native';

import { enhance } from './object';

/**
 * Animated styles
 */
type AnimatedViewStyle = Animated.AnimatedProps<ViewStyle>;
type AnimatedTextStyle = Animated.AnimatedProps<TextStyle>;

/**
 * Different style types.
 */
type Style =
  | AnimatedTextStyle
  | AnimatedViewStyle
  | TextStyle
  | TextStyle[]
  | ViewStyle
  | ViewStyle[];

export const enhanceTextStyle = (styles: Style[]) => enhance<TextStyle>(styles);
export const enhanceViewStyle = (styles: Style[]) => enhance<ViewStyle>(styles);
