import React, { forwardRef } from "react";
import { StyledIconButton, StyledButton } from "../../ui";
import { IconPlus } from "../../../_Icon";
const getDefaultIcon = (size)=>{
    const iconSize = size === 'xs' ? 'xs' : 's';
    return /*#__PURE__*/ React.createElement(IconPlus, {
        size: iconSize,
        color: "inherit"
    });
};
export const AttachButton = /*#__PURE__*/ forwardRef((props, ref)=>{
    if (props.buttonType === 'iconButton') {
        const { size, icon, ...rest } = props;
        return /*#__PURE__*/ React.createElement(StyledIconButton, {
            ref: ref,
            ...rest
        }, icon || getDefaultIcon(size));
    }
    const { text = 'Загрузить файл', ...rest } = props;
    return /*#__PURE__*/ React.createElement(StyledButton, {
        ref: ref,
        text: text,
        ...rest
    });
});
