var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React, { useContext } from 'react';
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
import { Button } from '../Button/index.js';
import { useSizeControl } from '../../lib/size/useSizeControl.js';
import { UndoIcon } from './UndoIcon.js';
export var FxInputRestoreBtn = function (props) {
    var theme = useContext(ThemeContext);
    var size = useSizeControl(props.size);
    var iconSizes = {
        small: parseInt(theme.inputIconSizeSmall),
        medium: parseInt(theme.inputIconSizeMedium),
        large: parseInt(theme.inputIconSizeLarge),
    };
    var cornersSizes = {
        small: {
            borderTopLeftRadius: theme.inputBorderRadiusSmall,
            borderBottomLeftRadius: theme.inputBorderRadiusSmall,
        },
        medium: {
            borderTopLeftRadius: theme.inputBorderRadiusMedium,
            borderBottomLeftRadius: theme.inputBorderRadiusMedium,
        },
        large: {
            borderTopLeftRadius: theme.inputBorderRadiusLarge,
            borderBottomLeftRadius: theme.inputBorderRadiusLarge,
        },
    };
    var buttonCorners = cornersSizes[size];
    var iconUndo = React.createElement(UndoIcon, { size: iconSizes[size] });
    return (React.createElement(Button, { size: props.size, onClick: props.onRestore, borderless: props.borderless, disabled: props.disabled, corners: __assign(__assign({ borderTopRightRadius: 0, borderBottomRightRadius: 0 }, buttonCorners), props.corners), icon: iconUndo, "aria-label": props['aria-label'] }));
};
//# sourceMappingURL=FxInputRestoreBtn.js.map