import { PictureInterface, ProductViewImageInterface, ProductViewItemInterface, } from '../index'; export default class ProductViewImageModel { public static isProductViewImage( productViewImage: ProductViewItemInterface, ) { return (productViewImage as ProductViewImageInterface) .flipped !== undefined; } public static setZoom( productViewImage: ProductViewImageInterface, zoom: number, ): ProductViewImageInterface { return { ...productViewImage, zoom, }; } public static create( picture?: PictureInterface, ): ProductViewImageInterface { return { baseWidthPercent: 1, flipped: false, isTooLowQualityToPrint: false, picture, relativeStartPoint: { x: 0, y: 0, }, rotation: 0, zoom: 1, zoomCount: 0, }; } }