import { computed } from 'vue';
import { useProjectSettingStore } from '@/store/modules/projectSetting';

export function useProjectSetting() {
  const projectStore = useProjectSettingStore();

  const getNavMode = computed(() => projectStore.navMode);

  const getNavTheme = computed(() => projectStore.navTheme);

  const getHeaderSetting = computed(() => projectStore.headerSetting);

  const getBodySetting = computed(() => projectStore.bodySetting);

  const getMultiTabsSetting = computed(() => projectStore.multiTabsSetting);

  const getMenuSetting = computed(() => projectStore.menuSetting);

  const getCrumbsSetting = computed(() => projectStore.crumbsSetting);

  const getPermissionMode = computed(() => projectStore.permissionMode || 'BACK');

  const getShowFooter = computed(() => projectStore.showFooter);

  const getIsPageAnimate = computed(() => projectStore.isPageAnimate);

  const getPageAnimateType = computed(() => projectStore.pageAnimateType);

  const getMenuWidth = computed(() => projectStore.menuSetting.menuWidth);

  const getMenuMinWidth = computed(() => projectStore.menuSetting.minMenuWidth);

  const getIsProjectSetting = computed(() => projectStore.isProjectSetting);

  return {
    getNavMode,
    getNavTheme,
    getHeaderSetting,
    getBodySetting,
    getMultiTabsSetting,
    getMenuSetting,
    getCrumbsSetting,
    getPermissionMode,
    getShowFooter,
    getIsPageAnimate,
    getPageAnimateType,
    getMenuWidth,
    getMenuMinWidth,
    getIsProjectSetting,
  };
}
