import styled from "styled-components";
import { NavLink } from "react-router-dom";

export const SideMenuContainer = styled.div`
  position: fixed;

  width: ${({ isOpen }) => (isOpen ? "239px" : "48px")};

  @media screen and (max-width: 1366px) {
    width: ${({ isOpen }) => (isOpen ? "200px" : "48px")};
  }

  height: 625px;
  max-height: 609px;
  display: flex;
  flex-direction: column;

  background-color: #00c2c2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  padding: 30px 0;
  transition: width 0.2s ease-in-out;
  z-index: 100;
  border-radius: 30px;
  margin-left: 77px;

  &.pending_delete {
    background-color: #c6cccc;
  }
  &.disabled {
    pointer-events: none;
  }

  .toggle {
    width: 20px;
    height: 20px;
    display: flex;
    border-radius: 4px;
    background: #fff;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 115px;
    right: -13px;
    color: #fdcf04;
  }

  /* GRACE PERIOD AND DEACTIVATE  */
  &.grace_period {
    border-radius: 30px;
    background: var(--Neutral-30, #c6cccc);
    /* color: #fff; */

    .active {
      background: var(--Neutral-50, #949999);
      color: #ffffff;
      margin: 2px 0px;
      &::before {
        background: #949999;
      }
    }
  }
`;

export const NavigationContainer = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 5px;
`;
export const NavigationItemContainer = styled.p`
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
  position: relative;
  padding: ${({ minimal }) => (minimal ? "12px 16px" : "12px 12px")};
  color: ${({ active }) =>
    active
      ? "rgb(255, 255, 255) !important"
      : "rgba(255, 255, 255, 0.625) !important"};
  &:hover {
    color: #ffffff !important;
    background-color: #31cdcd;

    > div {
      opacity: 1;
    }
  }
  &.active {
    background-color: rgba(0, 153, 153, 0.5);
    // border-left: 5px solid #febf10;
    border-radius: 10px 0 0px 10px;
    color: #ffffff;
    &::before {
      content: "";
      height: 110%;
      width: 5px;
      border-radius: 0 10px 10px 0;
      position: absolute;
      top: -5%;
      left: 0;
      display: block;
      background: #febf10;
    }
  }
  &.pending_delete_item {
    opacity: 0.8 !important;
    &.active {
      background-color: #949999;
      &::before {
        background-color: #949999;
      }
    }
  }
  /* GRACE PERIOD AND DEACTIVATED */
  &.grace_period {
    background: var(--Neutral-40, #adb2b2);
    margin: 2px 0px;
  }

  &.grace_period_active {
    background: var(--Neutral-50, #949999);
    color: #ffffff;
    margin: 2px 0px;
    &::before {
      content: "";
      height: 110%;
      width: 5px;
      border-radius: 0 10px 10px 0;
      position: absolute;
      top: -5%;
      left: 0;
      display: block;
      background: #949999;
    }
  }
  &.disabled {
    pointer-events: none;
    opacity: 0.5;
  }
`;

export const IconContainer = styled.div`
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  opacity: ${({ active }) => (active ? "1" : "0.625")};
`;

export const TextContainer = styled.div`
  display: ${({ minimal }) => (minimal ? "flex" : "none")};
  align-items: center;
  font-size: 16px;
  letter-spacing: 0.32px;
  font-weight: 600;
  color: inherit;

  @media screen and (max-width: 1366px) {
    font-size: 14px;
  }
`;

export const NotificationCount = styled.div`
  background-color: rgba(254, 191, 16, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  &.pending_delete_item {
    background-color: #949999;
  }

  ${({ minimal }) =>
    minimal
      ? null
      : `
    position: absolute;
    bottom: 11px;
    right: 14px;
    width: 12px;
    height: 12px;
    font-size: 12px;
    .text {
        display: none;
    }
  `};
`;

export const LogoutButtonContainer = styled.div`
  margin-top: auto;
  display: flex;
  gap: 10px;
  cursor: pointer;
  color: rgba(253, 253, 253, 0.595);
  &:hover {
    color: #ffffff;
  }
`;

export const LogoutIcon = styled.img`
  width: 20px;
  height: 20px;
  margin-right: 5px;
`;

export const LogoutText = styled.div`
  font-weight: bold;
`;
