import { jsxs, jsx } from 'react/jsx-runtime';
import React from 'react';
import { Button } from '../core/LocalUI.js';
import cs from './PhotoEditor.module.css.js';

const PhotoEditorToolbar = React.memo(({ api }) => {
    const { t, accent, historyIdx, historyLength, undo, redo, handleReset, showCompare, setShowCompare, handleDownload, handleCopyToClipboard, handleShareNative, onCancel, handleSave, } = api;
    return (jsxs("div", { className: cs.toolbar, children: [jsxs("div", { className: cs.toolbarGroup, children: [jsx(Button, { variant: "dark", size: "sm", onClick: undo, disabled: historyIdx <= 0, title: "Cofnij (Ctrl+Z)", children: jsx("i", { className: "fa fa-undo" }) }), jsx(Button, { variant: "dark", size: "sm", onClick: redo, disabled: historyIdx >= historyLength - 1, title: t("photoEditor.redo", "Redo (Ctrl+Y)"), children: jsx("i", { className: "fa fa-repeat" }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleReset, title: "Reset", children: jsx("i", { className: "fa fa-refresh" }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: showCompare ? "outline-info" : "dark", size: "sm", onClick: () => setShowCompare(!showCompare), title: t("photoEditor.compareOriginal", "Compare with original"), children: jsx("i", { className: "fa fa-columns" }) }), jsx("div", { className: cs.toolbarDivider }), jsx(Button, { variant: "dark", size: "sm", onClick: handleDownload, title: "Download", children: jsx("i", { className: "fa fa-download" }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleCopyToClipboard, title: "Copy to clipboard", children: jsx("i", { className: "fa fa-clipboard" }) }), jsx(Button, { variant: "dark", size: "sm", onClick: handleShareNative, title: t("common.share", "Share"), children: jsx("i", { className: "fa fa-share-alt" }) })] }), jsxs("div", { className: cs.toolbarTitle, style: { color: accent }, children: [jsx("i", { className: "fa fa-magic me-2" }), t("photoEditor.title", "Photo Editor")] }), jsxs("div", { className: cs.toolbarGroup, children: [jsxs(Button, { variant: "outline-secondary", size: "sm", onClick: onCancel, children: [jsx("i", { className: "fa fa-times me-1" }), " ", t("common.cancel", "Cancel")] }), jsxs(Button, { size: "sm", style: { background: accent, borderColor: accent, color: "#fff", fontWeight: 600 }, onClick: handleSave, children: [jsx("i", { className: "fa fa-check me-1" }), " ", t("photoEditor.apply", "Apply")] })] })] }));
});
PhotoEditorToolbar.displayName = "PhotoEditorToolbar";

export { PhotoEditorToolbar as default };
//# sourceMappingURL=PhotoEditorToolbar.js.map
