import styled from 'styled-components/macro'

type Props = {
  active?: boolean,
}

export const Wrapper = styled.div`
  margin-bottom: 10px;
`

export const SectionWrapper = styled.div<Props>`
  overflow: hidden;
  transition: .3s;

  ${({ active }) => (
    active
      ? 'height: auto;'
      : 'height: 0;'
  )}
`

export const DropdownButton = styled.button<Props>`
  height: 100%;
  width: 100%;
  outline: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  cursor: pointer;
`

export const Arrows = styled.span<Props>`
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  background-repeat: no-repeat;
  background-position: center;

  ${({ active }) => (
    active
      ? 'background-image: url(/images/arrowUp.svg);'
      : 'background-image: url(/images/arrowDown.svg);'
  )}
`
