'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var styled = require('styled-components');
var index = require('../../utils/index.js');
var styles = require('../Spinner/styles.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);

const InfoSubheading = styled__default['default'].h2 `
  ${index.getFontSize('size16')};
  margin: ${index.getSpacing('s00', 's02', 's00', 's00')};
  padding: ${index.getSpacing('s00')};
  color: ${index.getColorAlias('contentDefault')};
  font-weight: ${(props) => props.theme.font.weightExtrabold};
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`;
const SizeBody = styled__default['default'].span `
  ${index.getFontSize('size14')};
  margin-right: ${index.getSpacing('s02')};
  color: ${index.getColorAlias('contentDefault')};
`;
const MessageBody = styled__default['default'].span `
  display: flex;
  ${index.getFontSize('size14')};
  margin-top: ${index.getSpacing('s01')};
  color: ${({ messageType }) => messageType === 'success'
    ? index.getColorAlias('contentPositive')
    : index.getColorAlias('contentError')};
  fill: ${({ messageType }) => messageType === 'success'
    ? index.getColorAlias('contentPositive')
    : index.getColorAlias('contentError')};

  svg {
    margin-right: ${index.getSpacing('s02')};
    ${index.getFontSize('size16')};
  }
`;
const FileInfoContainer = styled__default['default'].div `
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;

  ${styles.Loader} {
    margin-right: ${index.getSpacing('s02')};
  }
`;
const FileInfo = styled__default['default'].div `
  display: flex;
  align-items: center;
`;
const AssistText = styled__default['default'].span `
  ${index.getFontSize('size14')};
  margin-top: ${index.getSpacing('s01')};
  color: ${index.getColorAlias('contentDefault')};
`;
const Header = styled__default['default'].div `
  display: flex;
  justify-content: space-between;
  color: ${index.getColorAlias('contentDefault')};
  ${index.getFontSize('size14')};
  margin-bottom: ${index.getSpacing('s01')};

  span:nth-child(1) {
    font-weight: ${(props) => props.theme.font.weightExtrabold};
    margin-right: ${index.getSpacing('s01')};
  }

  span:nth-child(2) {
    text-align: right;
    margin-left: ${index.getSpacing('s01')};
  }
`;
const UploaderContainer = styled__default['default'].div `
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: ${({ width }) => width || '100%'};
`;
const UploaderWrapper = styled__default['default'].div.withConfig({
    shouldForwardProp: index.convertToTransientProps([
        'hasFile',
        'shouldDisplayThumbnail',
    ]),
}) `
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: ${index.getSpacing('s04')};
  border: ${(props) => `1px solid ${index.getColorAlias('borderDefault', props.theme)}`};
  border-radius: ${({ theme: { radius }, hasFile, shouldDisplayThumbnail }) => `${radius.roundedB} ${radius.roundedB}
    ${shouldDisplayThumbnail && hasFile ? radius.roundedNone : radius.roundedB}
    ${shouldDisplayThumbnail && hasFile ? radius.roundedNone : radius.roundedB}`};
`;
const FileContainer = styled__default['default'].div `
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  background-color: ${({ theme }) => theme.global.black};
  border-right: ${(props) => `1px solid ${index.getColorAlias('borderDefault', props.theme)}`};
  border-left: ${(props) => `1px solid ${index.getColorAlias('borderDefault', props.theme)}`};
  border-bottom: ${(props) => `1px solid ${index.getColorAlias('borderDefault', props.theme)}`};
  border-radius: ${({ theme: { radius } }) => `0 0 ${radius.roundedB} ${radius.roundedB}`};
  max-height: 200px;

  img {
    max-height: 199px;
    max-width: 100%;
    object-fit: contain;
  }
`;
const ActionButtonsWrapper = styled__default['default'].div `
  display: flex;
`;

exports.ActionButtonsWrapper = ActionButtonsWrapper;
exports.AssistText = AssistText;
exports.FileContainer = FileContainer;
exports.FileInfo = FileInfo;
exports.FileInfoContainer = FileInfoContainer;
exports.Header = Header;
exports.InfoSubheading = InfoSubheading;
exports.MessageBody = MessageBody;
exports.SizeBody = SizeBody;
exports.UploaderContainer = UploaderContainer;
exports.UploaderWrapper = UploaderWrapper;
