import { useAppStore } from "@/store/appStore";
export const useEnv = () => {
  const { systemInfo } = useAppStore();
  const platform = ref(window.platform || "");
  const isH5 = computed(() => platform.value === "h5");
  const isWap2App = computed(() => platform.value === "wap2app");
  const isAndroid = computed(() => systemInfo.platform.toLowerCase() == 'android')
  const isIOS = computed(() => systemInfo.platform.toLowerCase() == 'ios')

  return {
    platform,
    isH5,
    isWap2App,
    isAndroid,
    isIOS
  }
}