import { Box } from "@mui/material";
import styled from "styled-components";
import selectedTheme from "../../../../themes";
import { BackgroundTransition } from "../../../MarketPlace/Header/SkeletonHeader/SkeletonHeader.styled";

export const ItemsTransition = styled(Box)`
  transition-duration: 0.4s;
  transition-property: background-color;
  background-color: ${props => props.animationStage === 1 ? selectedTheme.filterSkeletonItems : selectedTheme.filterSkeletonItemsSecond} !important;
`;

export const SkeletonOfferCardContainer = styled(BackgroundTransition)`
  display: flex;
  flex-direction: row;
  width: 100%;
  box-sizing: border-box;
  margin: 14px 0;
  border-radius: 4px;
  ${(props) =>
    props.sponsored === "true" &&
    `border: 1px solid ${selectedTheme.borderSponsoredColor};`}
  padding: 16px;
  max-width: 2000px;
  height: 180px;
  position: relative;
  & * {
    border-radius: 4px;
  }
  @media (max-width: 550px) {
    height: 184px;
    padding: 18px;
    padding-top: 12px;
    ${(props) =>
      props.vertical &&
      `
      height: 330px;
      width: 180px;
      margin: 0 18px;
    `}
  }
`;
export const LeftPart = styled(Box)`
  display: flex;
  flex: 1;
  flex-direction: row;
  margin-right: 40px;
`;
export const SpreadLine = styled(Box)`
  height: 108px;
  margin-top: auto;
  margin-bottom: auto;
  opacity: 0.12;
  border: 1px solid black;
`;
export const RightPart = styled(Box)`
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  margin-left: 36px;
  padding-top: 20px;
`;
export const SkeletonImage = styled(ItemsTransition)`
  width: 144px;
  height: 144px;
`;
export const SkeletonColumnContainer = styled(Box)`
  display: flex;
  margin-left: 18px;
  justify-content: space-between;
  flex: 1;
  flex-direction: column;
`;
export const SkeletonTitle = styled(ItemsTransition)`
  width: 90px;
  height: 27px;
`;
export const SkeletonGroup = styled(Box)`
  display: flex;
  flex-direction: column;
  gap: 4px;
`;
export const SkeletonAuthor = styled(ItemsTransition)`
  width: 117px;
  height: 18px;
`;
export const SkeletonLocation = styled(ItemsTransition)`
  width: 90px;
  height: 18px;
`;
export const SkeletonRowGroup = styled(Box)`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
`;
export const SkeletonDetail = styled(ItemsTransition)`
  width: 72px;
  height: 14px;
  background-color: ${selectedTheme.filterSkeletonItems};
`;
export const SkeletonDescription = styled(ItemsTransition)`
  width: 72px;
  height: 14px;
  background-color: ${selectedTheme.filterSkeletonItems};
`;
export const SkeletonDescriptionLine = styled(ItemsTransition)`
  width: 221px;
  height: 18px;
  background-color: ${selectedTheme.filterSkeletonItems};
`;
export const SkeletonMessageButton = styled(ItemsTransition)`
  width: 40px;
  height: 40px;
  border-radius: 100%;
  background-color: ${selectedTheme.filterSkeletonItems};
  top: 18px;
  right: 18px;
`;
export const SkeletonExchangeButton = styled(ItemsTransition)`
  width: 180px;
  height: 48px;
  background-color: ${selectedTheme.filterSkeletonItems};
  bottom: 18px;
  right: 18px;
  position: absolute;
  padding-top: 17px;
`;
export const SkeletonExchangeLine = styled(BackgroundTransition)`
  width: 108px;
  height: 14px;
  background-color: ${selectedTheme.filterSkeletonBackground};
  margin: auto;
`;
