"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SoftLockedDeleteButton = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const BasicButton_1 = tslib_1.__importDefault(require("nice-ui/lib/2-inline-block/BasicButton"));
const Iconista_1 = require("nice-ui/lib/icons/Iconista");
const BasicTooltip_1 = require("nice-ui/lib/4-card/BasicTooltip");
const use_t_1 = require("use-t");
const SoftLockedDeleteButton = ({ onDelete }) => {
    const [t] = (0, use_t_1.useT)();
    const [locked, setLocked] = React.useState(true);
    return (React.createElement(BasicTooltip_1.BasicTooltip, { renderTooltip: () => (locked ? t('Unlock delete') : t('Delete')) },
        React.createElement(BasicButton_1.default, { size: 32, rounder: true, onClick: () => {
                if (locked) {
                    setLocked(false);
                    return;
                }
                onDelete();
            } },
            React.createElement(Iconista_1.Iconista, { set: 'lucide', icon: 'trash', width: 16, height: 16, style: { opacity: locked ? 0.5 : 1 } }))));
};
exports.SoftLockedDeleteButton = SoftLockedDeleteButton;
//# sourceMappingURL=SoftLockedDeleteButton.js.map