"use strict";

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

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

var getDropzoneHeight = function getDropzoneHeight(props) {
  return props.attachments && props.attachments.length > 0 ? undefined : '200px';
};

exports.getDropzoneHeight = getDropzoneHeight;

var getDropzoneOpacity = function getDropzoneOpacity(props) {
  return props.savePending ? 0.5 : 1;
};

exports.getDropzoneOpacity = getDropzoneOpacity;

var getDropzoneBorderColor = function getDropzoneBorderColor(_ref) {
  var theme = _ref.theme,
      attachmentsError = _ref.attachmentsError;
  return (0, _branding.getPaletteColor)(attachmentsError != null ? 'error-fg' : 'greyscale-light')({
    theme: theme
  });
};

exports.getDropzoneBorderColor = getDropzoneBorderColor;