'use strict';

var jsxRuntime = require('react/jsx-runtime');
var usePhotoEditor = require('./usePhotoEditor.js');
var PhotoEditorToolbar = require('./PhotoEditorToolbar.js');
var PhotoEditorLeftPanel = require('./PhotoEditorLeftPanel.js');
var PhotoEditorCanvas = require('./PhotoEditorCanvas.js');
var PhotoEditor_module = require('./PhotoEditor.module.css.js');

// ── Component ──
function NicePhotoEditor(props) {
    const api = usePhotoEditor.usePhotoEditor(props);
    if (api.loading || !api.image) {
        return (jsxRuntime.jsx("div", { className: PhotoEditor_module.loadingWrap, children: jsxRuntime.jsx("i", { className: "fa fa-spinner fa-spin fa-2x" }) }));
    }
    return (jsxRuntime.jsxs("div", { className: PhotoEditor_module.wrapper, children: [jsxRuntime.jsx(PhotoEditorToolbar, { api: api }), jsxRuntime.jsxs("div", { className: PhotoEditor_module.mainContent, children: [jsxRuntime.jsx(PhotoEditorLeftPanel, { api: api }), jsxRuntime.jsx(PhotoEditorCanvas, { api: api })] })] }));
}

module.exports = NicePhotoEditor;
//# sourceMappingURL=PhotoEditor.js.map
