'use strict';

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

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

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.cjs.map
