| 
									
										
										
										
											2023-09-15 01:53:50 +02:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-09-21 15:29:34 +02:00
										 |  |  |   import type { OsmTags } from "../../Models/OsmFeature" | 
					
						
							|  |  |  |   import { Utils } from "../../Utils" | 
					
						
							| 
									
										
										
										
											2023-12-29 22:46:02 +01:00
										 |  |  |   import { Store } from "../../Logic/UIEventSource" | 
					
						
							| 
									
										
										
										
											2024-01-25 03:33:28 +01:00
										 |  |  |   import Envelope from "../../assets/svg/Envelope.svelte" | 
					
						
							| 
									
										
										
										
											2023-09-15 01:53:50 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   export let tags: Store<OsmTags> | 
					
						
							|  |  |  |   export let args: string[] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-21 15:29:34 +02:00
										 |  |  |   let [to, subject, body, button_text] = args.map((a) => Utils.SubstituteKeys(a, $tags)) | 
					
						
							|  |  |  |   let url = | 
					
						
							|  |  |  |     "mailto:" + to + "?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body) | 
					
						
							| 
									
										
										
										
											2023-09-15 01:53:50 +02:00
										 |  |  | </script> | 
					
						
							| 
									
										
										
										
											2023-09-21 15:29:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-29 22:46:02 +01:00
										 |  |  | <a class="button flex w-full items-center" href={url} style="margin-left: 0"> | 
					
						
							| 
									
										
										
										
											2024-02-20 13:33:38 +01:00
										 |  |  |   <Envelope class="mr-4 h-8 w-8 shrink-0" /> | 
					
						
							| 
									
										
										
										
											2023-09-15 01:53:50 +02:00
										 |  |  |   {button_text} | 
					
						
							|  |  |  | </a> |