'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FieldLibraryProvider } from './context.js';
import { EditorThemeProvider } from '../shared/editor_theme/index.js';
import { Toolbar } from './components/toolbar.js';
import { ElementList } from './components/element_list.js';
import { ElementEditor } from './components/element_editor.js';
import { cn } from '../../utils/cn.js';
function FieldLibraryInner({ className }) {
    return (_jsxs("div", { className: cn('flex flex-col h-full bg-background', className), children: [_jsx(Toolbar, {}), _jsxs("div", { className: "flex flex-1 overflow-hidden", children: [_jsx("div", { className: "w-72 border-r bg-slate-50/50 dark:bg-slate-900/30 flex flex-col shrink-0", children: _jsx(ElementList, {}) }), _jsx("div", { className: "flex-1 flex flex-col overflow-hidden", children: _jsx(ElementEditor, {}) })] })] }));
}
export function HazoFieldLibrary({ api_base_url, table_name, scope_id, className, theme, templates, }) {
    return (_jsx(FieldLibraryProvider, { api_base_url: api_base_url, table_name: table_name, scope_id: scope_id, templates: templates, children: _jsx(EditorThemeProvider, { theme: theme, children: _jsx(FieldLibraryInner, { className: className }) }) }));
}
export default HazoFieldLibrary;
//# sourceMappingURL=field_library.js.map