const defaultImageId = 'defaultImage';
const defaultImageSource = '/assets/common/images/configure/defaultImage.png';
// 获取组态图片Controller方法的Url路径
const getDiagramImageMethodPath = '/ConfigureComponent/GetImage';
const idQueryStringPrefix = 'id=';
export class RemoteImageStore {
    constructor(remoteImageProtocol) {
        this.remoteImageProtocol = remoteImageProtocol;
    }
    getDiagramImageUrlPrefix() {
        return this.remoteImageProtocol.remoteServiceBaseUrl + getDiagramImageMethodPath + '?';
    }
    getImageUrl(imageId) {
        if (!imageId || imageId === defaultImageId) {
            return this.remoteImageProtocol.appBaseUrl + defaultImageSource;
        }
        return this.getDiagramImageUrlPrefix() + idQueryStringPrefix + imageId;
    }
}
