import { Link } from 'react-router-dom'

import styled, { css } from 'styled-components/macro'

export const Wrapper = styled.nav`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  height: 48px;
  margin-left: 90px;
  margin-right: 14px;
`
export const ToggleButton = styled.button`
  width: 18px;
  height: 16px;
  background-image: url(/images/menuIcon.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
`
export const MenuList = styled.ul`
  position: absolute;
  top: 50px;
  left: -73px;
  width: 288px;
  border-radius: 2px;
  background-color: #666;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 1;

  :before {
    content: '';
    position: absolute;
    top: 0;
    left: 82px;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%) rotate(45deg);
    background-color: #666;
  }
`
export const MenuItem = styled.li`
  position: relative;
  display: flex;
  height: 48px;
  line-height: 48px;
  cursor: pointer;

  :hover {
    background-color: #999;
  }
`

export const Icon = styled.div<{ image: string }>`
  width: 55px;
  background-image: url(/images/${({ image }) => `${image}.svg`});
  background-repeat: no-repeat;
  background-position: center;
`

export const linkStyles = css`
  width: 100%;
  font-size: 16px;
  font-weight: bold;
  color: #ccc;
`

export const StyledLink = styled(Link)`${linkStyles}`
