"use client";

import React from "react";
import Link from "next/link";
import styles from "./nav.module.css";

const NavPC: React.FC = (props) => {
  const isCurrent = (title: string) => {
    return title == props.title;
  };
  return (
    <div className={styles.nav}>
      <div className={styles["nav-bar"]}>
        <div className={styles["navbar-brand"]}>
          <a href={"/"}>
            <div className={styles.logo}>HIPO 高潜</div>
          </a>
        </div>
        <div className={styles["navbar-collapse"]}>
          <div className={styles["navbar-content"]}>
            <Link className={styles.link} href="/">
              首页
            </Link>
            <Link className={isCurrent("关于我们") ? styles.linkChecked : styles.link} href="/about">
              关于我们
            </Link>
            <Link className={styles.link} href="/#service">
              业务介绍
            </Link>
            <Link className={isCurrent("顾问介绍") ? styles.linkChecked : styles.link} href="/#consultant">
              顾问介绍
            </Link>
            <Link className={isCurrent("经典案例") ? styles.linkChecked : styles.link} href="/caseList">
              经典案例
            </Link>
            <Link className={isCurrent("联系我们") ? styles.linkChecked : styles.link} href="/contactUs">
              联系我们
            </Link>
            <Link className={styles.link} href={"https://hi-po.com.cn/user/login"}>
              登录
            </Link>
            <Link className={styles.link} href={"https://hi-po.com.cn/user/register"}>
              注册
            </Link>
          </div>
        </div>
      </div>
      <div className={styles["nav-line"]} />
    </div>
  );
};

export default NavPC;
