'use strict';

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

require('../../style/motion/index.js');
var index = require('../../style/index.js');
require('../../theme/index.js');
var dragger = require('./dragger.js');
var list = require('./list.js');
var motion = require('./motion.js');
var picture = require('./picture.js');
var rtl = require('./rtl.js');
var genComponentStyleHook = require('../../theme/util/genComponentStyleHook.js');
var statistic = require('../../theme/util/statistic.js');
var collapse = require('../../style/motion/collapse.js');

const genBaseStyle = (token) => {
  const { componentCls, colorTextDisabled } = token;
  return {
    [`${componentCls}-wrapper`]: {
      ...index.resetComponent(token),
      [componentCls]: {
        "outline": 0,
        "input[type='file']": {
          cursor: "pointer"
        }
      },
      [`${componentCls}-select`]: {
        display: "inline-block"
      },
      [`${componentCls}-disabled`]: {
        color: colorTextDisabled,
        cursor: "not-allowed"
      }
    }
  };
};
var useStyle = genComponentStyleHook.default("Upload", (token) => {
  const { fontSizeHeading3, fontSize, lineHeight, lineWidth, controlHeightLG } = token;
  const listItemHeightSM = Math.round(fontSize * lineHeight);
  const uploadToken = statistic.merge(token, {
    uploadThumbnailSize: fontSizeHeading3 * 2,
    uploadProgressOffset: listItemHeightSM / 2 + lineWidth,
    uploadPicCardSize: controlHeightLG * 2.55
  });
  return [
    genBaseStyle(uploadToken),
    dragger.default(uploadToken),
    picture.genPictureStyle(uploadToken),
    picture.genPictureCardStyle(uploadToken),
    list.default(uploadToken),
    motion.default(uploadToken),
    rtl.default(uploadToken),
    collapse.default(uploadToken)
  ];
});

exports.default = useStyle;
//# sourceMappingURL=index.js.map
