import React from 'react';

import {EmptyStateProps} from './types';
import {
  StyledEmptyState,
  StyledEmptyStateIcon,
  StyledEmptyStateDescription,
  StyledEmptyStateActions,
} from './style';

const EmptyState = ({
  icon = undefined,
  title,
  description = '',
  actions = '',
}: EmptyStateProps) => (
  <StyledEmptyState>
    {icon && (
    <StyledEmptyStateIcon>
      {icon}
    </StyledEmptyStateIcon>
    )}
    {title}
    {description && (
    <StyledEmptyStateDescription>
      {description}
    </StyledEmptyStateDescription>
    )}
    {actions && (
    <StyledEmptyStateActions>
      {actions}
    </StyledEmptyStateActions>
    )}
  </StyledEmptyState>
);

export default EmptyState;
