import { __assign, __rest } from "tslib";
import classnames from 'classnames';
import React from 'react';
import Header from '../header';
import SilderNav from '../silder-nav';
import TopNav from '../top-nav';
export default function LPPage(props) {
    var style = props.style, className = props.className, children = props.children, headerStyle = props.headerStyle, headerClassName = props.headerClassName, nav = props.nav, top = props.top, collapsible = props.collapsible, collapsed = props.collapsed, defaultCollapsed = props.defaultCollapsed, onCollapseTriggerClick = props.onCollapseTriggerClick, rest = __rest(props, ["style", "className", "children", "headerStyle", "headerClassName", "nav", "top", "collapsible", "collapsed", "defaultCollapsed", "onCollapseTriggerClick"]);
    return (React.createElement("div", { className: "lp-app-layout" },
        top ? React.createElement(TopNav, __assign({}, top)) : null,
        nav ? React.createElement(SilderNav, { className: top ? "layout-silder-nav" : undefined, nav: nav, collapsible: collapsible, collapsed: collapsed, defaultCollapsed: defaultCollapsed, onCollapseTriggerClick: onCollapseTriggerClick }) : null,
        React.createElement("div", { style: style, className: classnames("lp-page", className, { "layout-only-silder-content": nav }, { "layout-silder-content": top }) },
            React.createElement(Header, __assign({}, rest, { style: headerStyle, className: headerClassName, isNest: true })),
            children && (React.createElement("div", { className: "lp-page-container" }, React.Children.map(children, function (child) {
                return React.isValidElement(child)
                    ? React.cloneElement(child, {
                        nest: 1
                    })
                    : child;
            }))))));
}
