import { omitUndefined } from "@antdv/pro-utils";
import { ref, unref, watchEffect } from "vue";
function useCurrentMenuLayoutProps(currentMenu) {
  const currentMenuLayoutProps = ref({});
  watchEffect(() => {
    currentMenuLayoutProps.value = omitUndefined({
      // 有时候会变成对象，是原来的方式
      layout: typeof unref(currentMenu).layout !== "object" ? unref(currentMenu).layout : void 0,
      navTheme: unref(currentMenu).navTheme,
      menuRender: unref(currentMenu).menuRender,
      footerRender: unref(currentMenu).footerRender,
      menuHeaderRender: unref(currentMenu).menuHeaderRender,
      headerRender: unref(currentMenu).headerRender,
      fixSiderbar: unref(currentMenu).fixSiderbar
    });
  });
  return currentMenuLayoutProps;
}
export {
  useCurrentMenuLayoutProps
};
