"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const minus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/minus-circle-icon");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
require("./RemovableField.css");
const REMOVE_BUTTON_EXIT_DELAY = 1500;
const RemovableField = (_a) => {
    var { onRemove, hideRemoveButton = true, children, className, removeButtonDataTestId } = _a, props = tslib_1.__rest(_a, ["onRemove", "hideRemoveButton", "children", "className", "removeButtonDataTestId"]);
    return (react_1.default.createElement(react_core_1.Tooltip, Object.assign({ hidden: hideRemoveButton, exitDelay: REMOVE_BUTTON_EXIT_DELAY, flipBehavior: ['right', 'bottom'], position: "right-start", distance: 0, content: react_1.default.createElement(react_core_1.Button, { icon: react_1.default.createElement(react_core_1.Icon, { size: "sm" },
                react_1.default.createElement(minus_circle_icon_1.MinusCircleIcon, null)), variant: react_core_1.ButtonVariant.plain, onClick: onRemove, "data-testid": removeButtonDataTestId }), className: (0, classnames_1.default)('ai-remove-button__tooltip ', className) }, props), children));
};
exports.default = RemovableField;
//# sourceMappingURL=RemovableField.js.map