'use strict';

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

module.exports = PhotoEditorToolbar;
//# sourceMappingURL=PhotoEditorToolbar.js.map
