import Account from "components/Account/Account";
import Chains from "components/Chains";
import NativeBalance from "components/NativeBalance";
import MenuItems from "components/Header/MenuItems";
import SearchCollections from "components/Header/SearchCollections";
import { Layout } from "antd";
import { useInputValue } from "./useInputValue";
const { Header } = Layout;

const styles = {
  header: {
    position: "fixed",
    zIndex: 1,
    width: "100%",
    background: "#fff",
    display: "flex",
    justifyContent: "space-between",
    alignItems: "center",
    fontFamily: "Roboto, sans-serif",
    borderBottom: "2px solid rgba(0, 0, 0, 0.06)",
    padding: "0 10px",
    boxShadow: "0 1px 10px rgb(151 164 175 / 10%)",
  },
  headerRight: {
    display: "flex",
    flex: 1,
    alignItems: "center",
    justifyContent: "flex-end",
    gap: 10,
    marginRight: 10,
  },
};

export const Logo = () => (
  <div style={{ display: "flex" }}>
    <img style={{ width: "60px" }} src={require("images/logo.png")} />
  </div>
);

function HeaderComponent() {
  const [, handleInputValue] = useInputValue();

  return (
    <Header style={styles.header}>
      <Logo />
      <SearchCollections setInputValue={handleInputValue} />
      <MenuItems />
      <div style={styles.headerRight}>
        <Chains />
        <NativeBalance />
        <Account />
      </div>
    </Header>
  );
}

export default HeaderComponent;
