import React from "react";
import Taro from '@tarojs/taro';
import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_APPLY_REJECT, PROCESS_APPLY_VERIFY } from '@/utils/biz';

export default function useTitle(applyType) {
  React.useMemo(() => {
    switch (applyType) {
      case PROCESS_APPLY_DELAY:
        Taro.setNavigationBarTitle('申请延期');
        break;
      case PROCESS_APPLY_REJECT:
        Taro.setNavigationBarTitle('申请驳回');
        break;
      case PROCESS_APPLY_VERIFY:
        Taro.setNavigationBarTitle('申请审核');
        break;
      case PROCESS_APPLY_END:
        Taro.setNavigationBarTitle('申请办结');
        break;
    }
  }, [applyType]);
}
