import { jsx, jsxs } from 'react/jsx-runtime';
import { usePhotoEditor } from './usePhotoEditor.js';
import PhotoEditorToolbar from './PhotoEditorToolbar.js';
import PhotoEditorLeftPanel from './PhotoEditorLeftPanel.js';
import PhotoEditorCanvas from './PhotoEditorCanvas.js';
import cs from './PhotoEditor.module.css.js';

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

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