import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Icon, mergeClassNameProps, Modal } from "@powerhousedao/design-system";
import { twMerge } from "tailwind-merge";
const buttonStyles = "min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";
export function ConnectReplaceDuplicateModal(props) {
    const { title = "Document Already Exists", fileName, message, children, onReplace, onOpenChange, onDuplicate, replaceLabel = "Replace", duplicateLabel = "Create Copy", overlayProps, contentProps, bodyProps = {}, headerProps = {}, containerProps = {}, replaceButtonProps = {}, duplicateButtonProps = {}, buttonContainerProps = {}, ...restProps } = props;
    const defaultMessage = fileName
        ? `A document named "${fileName}" already exists in this location. Would you like to replace it or create a copy?`
        : "A document with the same name already exists in this location. Would you like to replace it or create a copy?";
    return (_jsx(Modal, { contentProps: {
            ...contentProps,
            className: twMerge("rounded-3xl", contentProps?.className),
        }, onOpenChange: onOpenChange, overlayProps: {
            ...overlayProps,
            className: overlayProps?.className,
        }, ...restProps, children: _jsxs("div", { ...mergeClassNameProps(containerProps, "w-[450px] p-6 text-slate-300"), children: [_jsxs("div", { className: "flex items-center justify-between border-b border-slate-50 pb-2", children: [_jsx("div", { ...mergeClassNameProps(headerProps, "text-2xl font-bold text-gray-800"), children: title }), _jsx("button", { type: "button", className: "flex size-6 items-center justify-center rounded-md outline-none hover:bg-slate-100", onClick: () => onOpenChange?.(false), children: _jsx(Icon, { name: "XmarkLight", size: 24 }) })] }), _jsxs("div", { ...mergeClassNameProps(bodyProps, "my-6 rounded-md bg-slate-50 p-4 text-center"), children: [message || defaultMessage, children] }), _jsxs("div", { ...mergeClassNameProps(buttonContainerProps, "mt-8 flex justify-between gap-3"), children: [_jsx("button", { onClick: onReplace, ...mergeClassNameProps(replaceButtonProps, twMerge(buttonStyles, "flex-1 bg-slate-50 text-slate-800")), children: replaceLabel }), _jsx("button", { onClick: onDuplicate, ...mergeClassNameProps(duplicateButtonProps, twMerge(buttonStyles, "flex-1 bg-gray-800 text-gray-50")), children: duplicateLabel })] })] }) }));
}
//# sourceMappingURL=replace-duplicate-modal.js.map