import { styled, css } from "styled-components";
import { TiThMenu } from "react-icons/ti";
import { BiSolidUserCircle } from "react-icons/bi";
import { AiOutlineClose } from "react-icons/ai";
import plantaeLogo from "../../assets/plantae_logo.png";
import plantaeIcon from "../../assets/plantae_icon.png";

export const Container = styled.div`
  ${({ theme }) => {
    return css`
      display: flex;
      width: 100%;
      height: 70px;
      border-radius: 0px 0px 10px 10px;
      box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
      align-items: center;
      padding: 0 30px;
    `;
  }}
`;

export const Icon = styled(TiThMenu)`
  width: 30px;
  height: 40px;
  cursor: pointer;
`;

export const Logo = styled.section`
  ${({ theme }) => {
    return css`
      z-index: 1;
      position: relative;
      background-image: url(${plantaeLogo});
      background-position: center;
      background-repeat: no-repeat;
      width: 100%;
      padding: 3.2rem;

      ${theme.medias.desktop} {
        display: flex;
        align-items: flex-end;
      }

      &::after {
        z-index: 2;
        content: "";
        position: relative;
        inset: 0;
        display: block;
      }
    `;
  }}
`;

export const UserInfo = styled.div`
  ${({ theme }) => {
    return css`
      display: none;
      align-items: center;
      gap: 0.5rem;
      color: ${theme.colors.content};
      text-align: center;
      font-family: Inter;
      font-size: 2rem;

      ${theme.medias.tablet} {
        display: flex;
      }
    `;
  }}
`;

export const UserIcon = styled(BiSolidUserCircle)`
  width: 30px;
  height: 40%;
  align-items: center;
`;

export const SideBarContainer = styled.section`
  ${({ theme }) => {
    return css`
      position: absolute;
      z-index: 1;
      background-color: white;
      height: 100%;
      width: 30rem;
      box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.25);
    `;
  }}
`;

export const CloseIcon = styled(AiOutlineClose)`
  width: 30px;
  height: 40px;
  position: absolute;
  right: 0;
  margin: 0.5rem;
  cursor: pointer;
`;

export const PlantaeIcon = styled.div`
  ${({ theme }) => {
    return css`
      background-image: url(${plantaeIcon});
      background-position: center;
      background-repeat: no-repeat;
      margin: 5rem auto;

      width: 100px;
      height: 100px;
      border: 1px solid;
      border-color: ${theme.colors.borderColor};
      border-radius: 100%;
    `;
  }}
`;

export const NavOption = styled.button`
  ${({ theme }) => {
    return css`
      height: 5.2rem;
      width: 90%;
      border-radius: 0px 10px 10px 0px;
      padding-left: 2.4rem;
      margin-top: 1px;
      align-items: center;
      display: flex;
      gap: 2rem;
      cursor: pointer;
      font-family: Inter;
      font-size: 2rem;
      font-weight: 700;
      border: none;
      background-color: white;
      
      &:hover {
        background-color: ${theme.colors.primary};
        color: #fff;
        transition: 0.3s;
      }
    `;
  }}
`;

export const LogoutButton = styled.div`
  ${({ theme }) => {
    return css`
      width: 100%;
      position: absolute;
      bottom: 0;
    `;
  }}
`;
