import DashboardLayout from "@/layouts/DashboardLayout";
import {Fragment} from "react";
import PrintLayout from "@/layouts/PrintLayout";

const layoutList = {
    DashboardLayout,
    PrintLayout
}

const Layout = ({layout = {}, children}) => {

    const Component = layoutList[layout?.name] || Fragment
    const props = layout?.props || {}

    return (
        <Component {...props}>
            {children}
        </Component>
    )
}

export default Layout