"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getDropzoneBorderColor = exports.getDropzoneHeight = void 0;

var _branding = require("../../mixins/branding");

var getDropzoneHeight = function getDropzoneHeight(_ref) {
  var attachments = _ref.attachments,
      _ref$baseHeight = _ref.baseHeight,
      baseHeight = _ref$baseHeight === void 0 ? '200px' : _ref$baseHeight;
  return attachments && attachments.length > 0 ? undefined : baseHeight;
};

exports.getDropzoneHeight = getDropzoneHeight;

var getDropzoneBorderColor = function getDropzoneBorderColor(_ref2) {
  var theme = _ref2.theme,
      attachmentsError = _ref2.attachmentsError,
      isDragActive = _ref2.isDragActive;

  if (isDragActive) {
    return (0, _branding.getPaletteColor)('greyscale-dark')({
      theme: theme
    });
  }

  if (attachmentsError != null) {
    return (0, _branding.getPaletteColor)('error-fg')({
      theme: theme
    });
  }

  return (0, _branding.getPaletteColor)('greyscale-light')({
    theme: theme
  });
};

exports.getDropzoneBorderColor = getDropzoneBorderColor;