/*
 * @Author: Nian Yi
 * @Date: 2022-04-11 12:10:59
 * @LastEditTime: 2022-04-20 17:10:53
 * @LastEditors: Nian Yi
 * @Description: 试用版本 折扣button
 * @FilePath: /easyvadmin/src/scripts/components/TrialUpgrade/index.tsx
 * 奥利给
 */
import React from 'react';
import styles from './index.less';
import {SKU_ID_TYPS} from 'models/user.types';

function TrialUpgrade({ skuId }: { skuId: SKU_ID_TYPS }) {
  const HOME_URL = window.appConfig.HOME_URL + '/price';
  if(![SKU_ID_TYPS.saas_advanced_try,SKU_ID_TYPS.saas_personal_try].includes(skuId)){
    return null;
  }
  return (
    <div className={styles.trialUpgrade}>
      <a href={HOME_URL} target="_blank">
        <div className={styles.button}>
          {skuId === SKU_ID_TYPS.saas_advanced_try ? (
            <>
              企业版<span>限时</span>折扣
            </>
          ) : skuId === SKU_ID_TYPS.saas_personal_try ?(
            <>
              首月特惠<span>9.9</span>元
            </>
          ) : null}
        </div>
      </a>
    </div>
  );
}

export default TrialUpgrade;
