import styled from 'styled-components';
import { Link } from 'react-router-dom';
import {FeatureItemProps} from './desktop.interface';

export const BlockStyle = styled.div`
  padding: 0 20px;
`;


export const BlockToolStyle = styled.div`
  padding: 20px 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  h3{
    margin-left: 0;
    margin-right: auto;
  }
  span{
    padding-left: 4px;
  }
`;

export const BlockContextStyle = styled.div`
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
`;

export const FeatureListStyle = styled.div`
  display: flex;
`;

export const AddItemStyle = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #fafafa;
  border: 1px dashed #d9d9d9;
  border-radius: 2px;
  opacity: ${(props: FeatureItemProps) => props.edit ? 0 : 1};
`;

export const FeatureItemStyle = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  cursor: pointer;
  &.isDraging{
    background: #f2f2f2;
    border-radius: 4px;
    cursor: grab;
  }
  /* animation: ${(props: FeatureItemProps) => props.edit ? 'wag 0.5s alternate infinite linear' : 'none'}; */
  @keyframes wag {
    0% {
      transform:rotate(-1deg);
    }
    100% {
      transform:rotate(1deg);
    }
  }
  p{
    padding: 16px 0;
    margin: 0;
    font-size: 14px;
    color: #333333;
    line-height: 14px;
  }
`;

export const FeatureItemDeleteStyle = styled.div`
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
`;


export const SortableListStyle = styled.div`
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
`;

export const HeaderMenuTitleStyle = styled(Link)`
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  span{
    padding-left: 4px;
  }
`;