| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | import Combine from "../Base/Combine" | 
					
						
							|  |  |  | import { FlowStep } from "./FlowStep" | 
					
						
							|  |  |  | import { Store, UIEventSource } from "../../Logic/UIEventSource" | 
					
						
							|  |  |  | import Link from "../Base/Link" | 
					
						
							|  |  |  | import CheckBoxes from "../Input/Checkboxes" | 
					
						
							|  |  |  | import Title from "../Base/Title" | 
					
						
							|  |  |  | import Translations from "../i18n/Translations" | 
					
						
							| 
									
										
										
										
											2022-01-21 01:57:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | export class ConfirmProcess | 
					
						
							|  |  |  |     extends Combine | 
					
						
							|  |  |  |     implements FlowStep<{ features: any[]; theme: string }> | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2022-06-05 02:24:14 +02:00
										 |  |  |     public IsValid: Store<boolean> | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |     public Value: Store<{ features: any[]; theme: string }> | 
					
						
							| 
									
										
										
										
											2022-01-21 01:57:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |     constructor(v: { features: any[]; theme: string }) { | 
					
						
							|  |  |  |         const t = Translations.t.importHelper.confirmProcess | 
					
						
							| 
									
										
										
										
											2022-04-19 23:42:58 +02:00
										 |  |  |         const elements = [ | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |             new Link( | 
					
						
							|  |  |  |                 t.readImportGuidelines, | 
					
						
							|  |  |  |                 "https://wiki.openstreetmap.org/wiki/Import_guidelines", | 
					
						
							|  |  |  |                 true | 
					
						
							|  |  |  |             ), | 
					
						
							| 
									
										
										
										
											2022-04-14 03:01:54 +02:00
										 |  |  |             t.contactedCommunity, | 
					
						
							|  |  |  |             t.licenseIsCompatible, | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |             t.wikipageIsMade, | 
					
						
							| 
									
										
										
										
											2022-04-19 23:42:58 +02:00
										 |  |  |         ] | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |         const toConfirm = new CheckBoxes(elements) | 
					
						
							| 
									
										
										
										
											2022-01-21 01:57:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |         super([new Title(t.titleLong), toConfirm]) | 
					
						
							| 
									
										
										
										
											2022-01-21 01:57:16 +01:00
										 |  |  |         this.SetClass("link-underline") | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  |         this.IsValid = toConfirm.GetValue().map((selected) => elements.length == selected.length) | 
					
						
							|  |  |  |         this.Value = new UIEventSource<{ features: any[]; theme: string }>(v) | 
					
						
							| 
									
										
										
										
											2022-01-21 01:57:16 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-09-08 21:40:48 +02:00
										 |  |  | } |