import styled from "styled-components";
import { TextLabel, Text } from "venice-ui";
import { Colors } from "../../untils/Theme";

interface IDetailPanelWrapperProps {
  top: number;
}
export const DetailPanelWrapper = styled.div<IDetailPanelWrapperProps>`
  padding-left: 16px;
  width: 24rem;
  height: calc(100vh - (${(p) => p.top}px) - 10px);
`;

export const DetailPanelContent = styled.div`
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-start;
  background-color: ${Colors.tileGray};
  padding: 0;
  box-sizing: border-box;
`;

export const ItemDetailsLabel = styled(TextLabel)`
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
`;

export const ItemDetailsText = styled(Text)`
  padding-bottom: 12px;
  min-height: 18px;
  width: 100%;
`;

export const ListItem = styled.div`
  padding: 0.4rem 16px;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  color: ${Colors.text}
  transition:300ms;
  :hover{
    color: ${Colors.seaBlue};
    transition:300ms;
  }
`;

export const DetailPanelWrapperHeader = styled.div`
  padding: 1rem 1.6rem;
  font-size: 1.6rem;
  line-height: 1.8rem;
  font-weight: 300;
  height: 4.4rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
`;
interface IDetailPanelWrapperFooterProps {
  isSingle: boolean;
}
export const DetailPanelWrapperFooter = styled.div<IDetailPanelWrapperFooterProps>`
  padding: 8px 1.6rem;
  background-color: ${Colors.tileGray};
  width: 100%;
  display: flex;
  justify-content: ${(p) => (p.isSingle ? "flex-end" : "space-between")};
`;

export const DetailPanelSection = styled.div`
  padding: 0 16px;
`;
export const DetailPanelSectionHeader = styled.div`
  display: flex;
  gap: 8px;
  padding: 8px 16px;
`;
export const ModeChooseWraper = styled.div`
  display: flex;
`;

interface ITextModeProps {
  isActive?: boolean;
  isDisabled?: boolean;
}
export const TextMode = styled(Text)<ITextModeProps>`
  cursor: pointer;
  transition: 300ms;
  padding: 0.2rem 0.2rem;
  ${(p) => p.isActive && `border-bottom: 2px solid ${Colors.seaBlue};`}
  ${(p) => p.isDisabled && `cursor: not-allowed;`}
  ${(p) =>
    !p.isDisabled &&
    ` :hover{
    color: ${Colors.seaBlue};`}
`;

export const DetailPanelSectionContent = styled.div`
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: auto;
    background-color: ${Colors.tileGray};
    padding: 0px;
    height: 100%;
`