/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-d4047d7
 * Released under the MIT license.
 */

import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { DialogForm, Field, Input, Paragraph, Text, } from '../../index.js';
export function ConfirmDeletionDialogForm(props) {
    let { name, onSubmit, onDismiss } = props;
    return (_jsxs(DialogForm, { title: "Delete Deployment", submitProps: {
            label: 'Delete',
            theme: 'danger',
        }, cancelProps: {
            label: 'I changed my mind',
        }, onSubmit: onSubmit, onDismiss: onDismiss, children: [_jsxs(Paragraph, { children: ["To delete the instance, please, enter its full name:", ' ', _jsx(Text.Strong, { children: name })] }), _jsx(Field, { name: "name", rules: [
                    {
                        required: true,
                        message: 'This field is required',
                    },
                    {
                        async validator(rule, value) {
                            if (value !== name) {
                                throw new Error('Incorrect name');
                            }
                        },
                    },
                ], children: _jsx(Input.Text, { placeholder: "Enter the name of the instance" }) })] }));
}

        