| 
									
										
										
										
											2021-06-18 01:25:13 +02:00
										 |  |  | import Combine from "../Base/Combine"; | 
					
						
							|  |  |  | import Attribution from "./Attribution"; | 
					
						
							|  |  |  | import Img from "../Base/Img"; | 
					
						
							| 
									
										
										
										
											2021-06-22 14:21:32 +02:00
										 |  |  | import ImageAttributionSource from "../../Logic/ImageProviders/ImageAttributionSource"; | 
					
						
							| 
									
										
										
										
											2021-06-18 01:25:13 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export class AttributedImage extends Combine { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(urlSource: string, imgSource: ImageAttributionSource) { | 
					
						
							|  |  |  |         urlSource = imgSource.PrepareUrl(urlSource) | 
					
						
							|  |  |  |         super([ | 
					
						
							|  |  |  |             new Img( urlSource), | 
					
						
							|  |  |  |             new Attribution(imgSource.GetAttributionFor(urlSource), imgSource.SourceIcon()) | 
					
						
							|  |  |  |         ]); | 
					
						
							|  |  |  |         this.SetClass('block relative h-full'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |