import { useTranslation } from 'react-i18next';

import SelectionCriteriaCard from '@composed-components/audience/SelectionCriteriaCard';
import { IconBuildingSkyscraper } from '@tabler/icons-react';

import { type AllCriteriaCardProps } from './types';

const AllCriteriaCard = ({
  sx,
  withArrow = false,
  showInfo = true,
  ...props
}: AllCriteriaCardProps) => {
  const { t } = useTranslation('material_hu_only');

  return (
    <SelectionCriteriaCard
      {...props}
      withArrow={withArrow}
      Icon={IconBuildingSkyscraper}
      title={t('audience.all_community_title')}
      description={t('audience.all_community_description')}
      info={showInfo ? t('audience.automatic_update') : undefined}
      infoTooltip={
        showInfo ? t('audience.all_community_info_tooltip') : undefined
      }
      sx={{ animationDelay: `50ms`, ...sx }}
    />
  );
};

export default AllCriteriaCard;
