import s from './styles.module.scss';
import { linksData as expertiseLinksData } from '@views/expertise/category/model/links';
import { linksData as ocenkaLinksData } from '@views/ocenka/category/model/links';
import { linksData as juristLinksData } from '@views/jurist/category/model/links';
import { expertsLinksData } from '@views/sitemap/model/links';
import { commonLinksData } from '@views/sitemap/model/links';
import Link from 'next/link';
import { Partners } from '@/feature/article';
import { breadcrumbData } from './model/breadcrums';
import { Breadcrumbs } from '@/widgets';

function Sitemap() {
  return (
    <>
      <Breadcrumbs breadcrumbs={breadcrumbData} />
      <section className={s.Container}>
        <h2 className={s.Header}>Страницы сайта</h2>
        <div className={s.Grid}>
          {commonLinksData.map(({ block }, index) => (
            <div key={index} className={s.Block}>
              <ul className={s.List}>
                {block.map(({ name, link }, idx) => (
                  <li key={idx} className={s.ListItem}>
                    {link ? <Link href={link}>{name}</Link> : name}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </section>
      <section className={s.Container}>
        <h2 className={s.Header}>Судебная экспертиза</h2>
        <div className={s.Grid}>
          {expertiseLinksData.map(({ block }, index) => (
            <div key={index} className={s.Block}>
              <ul className={s.List}>
                {block.map(({ name, link }, idx) => (
                  <li key={idx} className={s.ListItem}>
                    {link ? <Link href={link}>{name}</Link> : name}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </section>
      <section className={s.Container}>
        <h2 className={s.Header}>Услуги оценки имущества и бизнеса</h2>
        <div className={s.Grid}>
          {ocenkaLinksData.map(({ title, block }, index) => (
            <div key={index} className={s.Block}>
              <h3 className={s.Title}>{title}</h3>
              <ul className={s.List}>
                {block.map(({ name, link }, idx) => (
                  <li key={idx} className={s.ListItem}>
                    {link ? <Link href={link}>{name}</Link> : name}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </section>
      <section className={s.Container}>
        <h2 className={s.Header}>Юридические услуги</h2>
        <div className={s.Grid}>
          {juristLinksData.map(({ block }, index) => (
            <div key={index} className={s.Block}>
              <ul className={s.List}>
                {block.map(({ name, link }, idx) => (
                  <li key={idx} className={s.ListItem}>
                    {link ? <Link href={link}>{name}</Link> : name}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </section>
      <section className={s.Container}>
        <h2 className={s.Header}>Эксперты и оценщики</h2>
        <div className={s.Grid}>
          {expertsLinksData.map(({ block }, index) => (
            <div key={index} className={s.Block}>
              <ul className={s.List}>
                {block.map(({ name, link }, idx) => (
                  <li key={idx} className={s.ListItem}>
                    {link ? <Link href={link}>{name}</Link> : name}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </section>
      <Partners />
    </>
  );
}

export { Sitemap };
