import React, {ReactNode} from 'react';
import {StyleProp, View, ViewStyle} from 'react-native';
import {Title, TitleSize} from '@components/_HuGo/Title';

import {styles} from './styles';

interface Props {
  title: string;
  description?: string;
  IconComponent?: ReactNode;
  size?: TitleSize;
  style?: StyleProp<ViewStyle>;
}

export function ListEmpty({
  title,
  description,
  IconComponent,
  size,
  style,
}: Props) {
  return (
    <View style={[styles.container, style]}>
      {!!IconComponent && IconComponent}
      <Title
        center
        title={title}
        titleNumberOfLines={3}
        description={description}
        descriptionNumberOfLines={3}
        size={size}
      />
    </View>
  );
}
