import { HomeItem } from "./LocalBean";

/**
 * Binds data to components and provides interfaces.
 */
export class HomeViewModel {
  /**
   * 获取选尺寸制作数据
   * @return {Array<HomeItem>} resizeItems
   */
  getResizeData(): HomeItem[] {
    const resizeItems: HomeItem[] =  [
      { id: 11, name: '标准一寸', icon: $r('app.media.ic_resize_icon'),resize:'25x35mm',width: 25, height: 35 },
      { id: 12, name: '小一寸', icon: $r('app.media.ic_resize_icon'),resize:'22x32mm',width: 22, height: 32 },
      { id: 13, name: '标准二寸', icon: $r('app.media.ic_resize_icon'),resize:'35x53mm',width: 35, height: 53 },
      { id: 14, name: '小二寸', icon: $r('app.media.ic_resize_icon'),resize:'33x48mm',width: 33, height: 48 }
    ];

    return resizeItems;
  }

  /**
   * 获取选证件制作数据
   * @return {Array<HomeItem>} resizeItems
   */
  getCertificateData(): HomeItem[] {
    const resizeItems: HomeItem[] =  [
      { id: 21, name: '身份证', icon: $r('app.media.ic_placeholder'),resize:'26x32mm',width: 26, height: 32 },
      { id: 22, name: '护照', icon: $r('app.media.ic_placeholder'),resize:'33x48mm',width: 33, height: 48 },
      { id: 23, name: '驾驶证', icon: $r('app.media.ic_placeholder'),resize:'22x32mm',width: 22, height: 32 },
      { id: 24, name: '社保卡', icon: $r('app.media.ic_placeholder'),resize:'26x32mm',width: 26, height: 32 },
      { id: 25, name: '四六级', icon: $r('app.media.ic_placeholder'),resize:'26x32mm',width: 26, height: 32 },
      { id: 26, name: '司法考试', icon: $r('app.media.ic_placeholder'),resize:'33x48mm',width: 33, height: 48 },
      { id: 27, name: '结婚证', icon: $r('app.media.ic_placeholder'),resize:'40x60mm',width: 40, height: 60 },
      { id: 28, name: '中国签证', icon: $r('app.media.ic_placeholder'),resize:'35x45mm',width: 35, height: 45 }
    ];

    return resizeItems;
  }

  /**
   * 获取其他数据
   * @return {Array<HomeItem>} resizeItems
   */
  getOtherData(): HomeItem[] {
    const resizeItems: HomeItem[] =  [
      { id: 31, name: '拼长图', icon: $r('app.media.ic_home_long_image_icon'),resize:'',width: 0, height: 0 },
      { id: 32, name: '格式转换', icon: $r('app.media.ic_home_format_icon'),resize:'',width: 0, height: 0 },
      { id: 33, name: '改尺寸', icon: $r('app.media.ic_home_size_icon'),resize:'',width: 0, height: 0 },
      { id: 34, name: '拍照指南', icon: $r('app.media.ic_home_photo_guide_icon'),resize:'',width: 0, height: 0 }
    ];

    return resizeItems;
  }

}


const homeViewModel = new HomeViewModel();

export default homeViewModel;