import React, { Fragment } from 'react';
import { AppHeader } from '../../elements/Header/index.js';
import { NavToggler } from '../../elements/Nav/NavToggler/index.js';
import { DefaultNav } from '../../elements/Nav/index.js';
import { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js';
import { NavHamburger } from './NavHamburger/index.js';
import { Wrapper } from './Wrapper/index.js';
const baseClass = 'template-default';
export const DefaultTemplate = async ({ children, className, config: configPromise, i18n, permissions, user })=>{
    const config = await configPromise;
    const { admin: { components: { Nav: CustomNav } = {
        Nav: undefined
    } } = {} } = config;
    return /*#__PURE__*/ React.createElement(Fragment, null, /*#__PURE__*/ React.createElement("div", {
        className: `${baseClass}__nav-toggler-wrapper`,
        id: "nav-toggler"
    }, /*#__PURE__*/ React.createElement(NavToggler, {
        className: `${baseClass}__nav-toggler`
    }, /*#__PURE__*/ React.createElement(NavHamburger, null))), /*#__PURE__*/ React.createElement(Wrapper, {
        baseClass: baseClass,
        className: className
    }, /*#__PURE__*/ React.createElement(RenderCustomComponent, {
        CustomComponent: CustomNav,
        DefaultComponent: DefaultNav,
        componentProps: {
            config,
            i18n,
            permissions,
            user
        }
    }), /*#__PURE__*/ React.createElement("div", {
        className: `${baseClass}__wrap`
    }, /*#__PURE__*/ React.createElement(AppHeader, null), children)));
};

//# sourceMappingURL=index.js.map