function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import Button from '../deprecated/button/Button';
import Box from '../layout/Box';
import defaultStyle from './UploadButton.module.css';
import uploadButtonPropTypes, { defaultProps, propsDescription } from './UploadButton.propTypes';
import getCompliedCustomId from '../../utils/getCompliedCustomId';
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
import uploadButtonCssJSLogic from './UploadButton.cssJSLogic';
export default function UploadButtonSkeleton(props) {
  let {
    onChange,
    multiple,
    eleRef,
    variant,
    size,
    shape,
    text,
    startIcon,
    endIcon,
    disabled,
    color,
    onClick,
    accept,
    customId,
    customStyle,
    tagAttributes,
    tagGeneralAttributes
  } = props;
  let style = useMergeStyle(defaultStyle, customStyle);
  let className = uploadButtonCssJSLogic(props, style);
  return /*#__PURE__*/React.createElement(Box // className={style.base}
  , {
    tagAttributeProps: {
      'data-id': getCompliedCustomId(props, customId.uploadButton)
    }
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: onClick,
    text: text,
    variant: variant,
    size: size,
    shape: shape,
    startIcon: startIcon,
    endIcon: endIcon,
    disabled: disabled,
    color: color
  }), /*#__PURE__*/React.createElement("input", _extends({}, tagGeneralAttributes, {
    type: "file",
    className: className,
    ref: eleRef,
    onChange: onChange,
    multiple: multiple,
    accept: accept
  }, tagAttributes)));
}
UploadButtonSkeleton.propTypes = uploadButtonPropTypes;
UploadButtonSkeleton.defaultProps = defaultProps;
UploadButtonSkeleton.propsDescription = propsDescription;