import {
  MegaphoneIcon,
  Settings2Icon,
  StoreIcon,
  TrendingUpIcon,
  type LucideIcon
} from 'lucide-react'
import { nbspDash } from '@/shared/lib/typography'
import { Stagger, StaggerItem } from './motion'
import { SectionHeading } from './section-heading'

const AUDIENCE: { Icon: LucideIcon; title: string; text: string }[] = [
  {
    Icon: StoreIcon,
    title: 'Владельцам интернет-магазинов',
    text: 'Видите каждый заказ в момент оформления — где бы вы ни были.'
  },
  {
    Icon: Settings2Icon,
    title: 'Администраторам сайтов',
    text: 'Все сайты и их события в одном аккаунте — без входа в каждую админку.'
  },
  {
    Icon: TrendingUpIcon,
    title: 'Менеджерам по продажам',
    text: 'Реагируйте на заказы и заявки сразу, пока клиент не ушёл к конкурентам.'
  },
  {
    Icon: MegaphoneIcon,
    title: 'Маркетологам',
    text: 'Следите за заявками с форм в реальном времени во время рекламных кампаний.'
  }
]

export const Audience = () => (
  <section className='border-y bg-muted/40 py-20 sm:py-28'>
    <div className='mx-auto max-w-7xl px-4 lg:px-6'>
      <SectionHeading
        eyebrow='Для кого'
        title='Для всех, кто отвечает за сайт и продажи'
      />
      <Stagger className='mt-14 grid gap-4 sm:grid-cols-2 lg:mt-16 lg:grid-cols-4 lg:gap-5'>
        {AUDIENCE.map(({ Icon, title, text }) => (
          <StaggerItem
            key={title}
            className='group rounded-3xl border bg-card p-6 shadow-xs transition-[translate,box-shadow,border-color] duration-300 hover:-translate-y-1 hover:border-primary/40 hover:shadow-xl hover:shadow-primary/5 sm:p-7'
          >
            <span className='flex size-12 items-center justify-center rounded-2xl bg-primary/10 text-primary transition-colors duration-300 group-hover:bg-primary group-hover:text-primary-foreground'>
              <Icon className='size-6' />
            </span>
            <h3 className='mt-6 font-display text-lg font-semibold tracking-tight'>
              {title}
            </h3>
            <p className='mt-2 text-muted-foreground text-pretty'>
              {nbspDash(text)}
            </p>
          </StaggerItem>
        ))}
      </Stagger>
    </div>
  </section>
)
