import { MdPhoneInTalk } from 'react-icons/md';
import { FaTelegramPlane, FaViber } from 'react-icons/fa';
import { BsWhatsapp } from 'react-icons/bs';
import { LucideIcon, Mail, Smartphone } from 'lucide-react';
import { IconType } from 'react-icons/lib';
import { PRODUCT_INFO } from '@/shared/constants/data';
import formatPhone from '@/shared/lib/formatPhone';

interface IHeaderData {
  id: number;
  icon: LucideIcon;
  title: string;
  link: string;
}

export const headerContactData: IHeaderData[] = [
  {
    id: 1,
    icon: Smartphone,
    title: formatPhone(PRODUCT_INFO.contact.phone),
    link: `tel:${PRODUCT_INFO.contact.phone}`,
  },
  {
    id: 2,
    icon: Mail,
    title: PRODUCT_INFO.contact.email,
    link: `mailto:${PRODUCT_INFO.contact.email}`,
  },
];

interface INavSocialIcons {
  id: number;
  icon: IconType;
  link: string;
  color: string;
}

export const navSocialIcons: INavSocialIcons[] = [
  {
    id: 1,
    icon: MdPhoneInTalk,
    link: `tel:${PRODUCT_INFO.contact.phone}`,
    color: '#137a01', // Custom color for phone icon
  },
  {
    id: 2,
    icon: BsWhatsapp,
    link: PRODUCT_INFO.socials.whatsapp,
    color: '#29a71a', // Custom color for WhatsApp icon
  },
  {
    id: 4,
    icon: FaViber,
    link: PRODUCT_INFO.socials.viber,
    color: '#665CAC', // Custom color for Viber icon
  },
  {
    id: 5,
    icon: FaTelegramPlane,
    link: PRODUCT_INFO.socials.telegram,
    color: '#0088cc', // Custom color for Telegram icon
  },
];

export interface INavItem {
  id: string;
  title: string;
  link: string;
  children?: {
    id: number;
    title: string;
    link: string;
  }[];
}

export const menuItemsData: INavItem[] = [
  {
    id: 'hm001a',
    title: 'Главная',
    link: '/',
  },
  {
    id: 'ab002b',
    title: 'О нас',
    link: '/about-us',
    children: [
      { id: 1, title: 'Наша компания', link: '/about-us/our-company' },
      { id: 2, title: 'Наш завод', link: '/about-us/our-factory' },
    ],
  },
  {
    id: 'pr005e',
    title: 'Продукты',
    link: '/products',
    children: [],
  },
  {
    id: 'cu032f',
    title: 'Контакты',
    link: '/contact-us',
  },
  {
    id: 'fq033g',
    title: 'Вопросы и ответы',
    link: '/faq',
  },
];
