import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
const BUTTON_VARIANTS = [
    'solid',
    'solid-brand',
    'brand',
    'outline',
    'outline-delete',
    'delete',
    'link',
    'icon',
    'ghost',
    'ghost-white',
    'subtle',
    'unstyled',
    'inputOutline',
    'nav'
];
const DEFAULT_BUTTON_VARIANT = 'solid';
const DEFAULT_BUTTON_SIZE = 'md';
const Button = (0, __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.forwardRef)((props, ref)=>{
    let { variant = DEFAULT_BUTTON_VARIANT, size = DEFAULT_BUTTON_SIZE, tooltip, ...rest } = props;
    // convert 'string' type to ButtonVariants equivalent
    if ('string' == typeof variant) // default to 'solid' if string variant isn't found
    variant = BUTTON_VARIANTS[BUTTON_VARIANTS.indexOf(variant)] || 'solid';
    const button = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Button, {
        variant: variant,
        size: size,
        ref: ref,
        ...rest
    });
    return tooltip ? /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Tooltip, {
        label: tooltip,
        placement: "bottom",
        hasArrow: true,
        color: "white"
    }, button) : button;
});
Button.displayName = 'RPButton';
/* ESM default export */ const Button_rslib_entry_ = Button;
export { Button_rslib_entry_ as default };
