import styled from 'styled-components/macro'

import { devices } from 'config/devices'

import { CardWrapper } from '../MatchCard/styled'

export const Wrapper = styled.div`
  position: relative;
  margin-bottom: 16px;
`

export const Slides = styled.ul`
  display: flex;
  scroll-behavior: smooth;
  overflow-x: auto;

  &::-webkit-scrollbar {
    display: none;
  }

  ${CardWrapper} {
    width: 283px;

    @media ${devices.laptop} {
      min-width: auto;
      width: 279px;
    }
  }

  @media ${devices.mobile} {
    flex-direction: column;

    ${CardWrapper} {
     width: 100%;
  }
  }
`

export const Arrow = styled.div<{ type: 'arrowLeft' | 'arrowRight' }>`
  position: absolute;
  top: 50%;
  left: ${({ type }) => (type === 'arrowLeft' ? '10px' : 'calc(100% - 10px)')};
  width: 40px;
  height: 40px;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url(${({ type }) => (type === 'arrowLeft'
    ? '/images/slideLeft.svg'
    : '/images/slideRight.svg')});
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 1;
`
