import { image } from "@kit.ImageKit";
import { util } from "@kit.ArkTS";

// 本地数据，用于处理抠图
@Observed
export class StickerItem {
  id: string = util.generateRandomUUID();
  pixelMap: image.PixelMap;
  type: number = 0; // 0:人像, 1:服装, 2:发型
  posX: number = 0;
  posY: number = 0;
  lastX: number = 0;
  lastY: number = 0;
  scaleValue: number = 1.0;
  lastScale: number = 1.0;
  rotateValue: number = 0;
  lastRotate: number = 0;
  zIndex: number = 0;
  isHidden: boolean = false;

  constructor(pm: image.PixelMap, type: number) {
    this.pixelMap = pm;
    this.type = type;
  }
}

// 本地数据，用于处理下载更新UniMp资源
export class UniMpLocalVersion {
  id:string ='';           // __UNI__F1F2FC0
  type: string = '';       // wx:微信, alipay:阿里
  version: string = '';    // 1.0.0
  path: string = '';       // data/storage/el2/base/haps/app/files/__UNI__F1F2FC0.wgt
}

