| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   <div | 
					
						
							|  |  |  |     class="mx-auto my-3 justify-center" | 
					
						
							|  |  |  |     style="display: flex;" | 
					
						
							|  |  |  |   > | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |     <div style="display: inline;"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <v-progress-circular | 
					
						
							|  |  |  |         :width="size.width" | 
					
						
							|  |  |  |         :size="size.size" | 
					
						
							|  |  |  |         color="primary-lighten-2" | 
					
						
							|  |  |  |         indeterminate | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |         <div class="text-center"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           <v-icon | 
					
						
							|  |  |  |             :size="size.icon" | 
					
						
							|  |  |  |             color="primary-lighten-2" | 
					
						
							|  |  |  |           > | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |             {{ $globals.icons.primary }} | 
					
						
							|  |  |  |           </v-icon> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           <div | 
					
						
							|  |  |  |             v-if="large" | 
					
						
							|  |  |  |             class="text-small" | 
					
						
							|  |  |  |           > | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |             <slot> | 
					
						
							| 
									
										
										
										
											2025-01-13 10:19:49 -06:00
										 |  |  |               {{ (small || tiny) ? "" : waitingText }} | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |             </slot> | 
					
						
							|  |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |       </v-progress-circular> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <div | 
					
						
							|  |  |  |         v-if="!large" | 
					
						
							|  |  |  |         class="text-small" | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |         <slot> | 
					
						
							| 
									
										
										
										
											2025-01-13 10:19:49 -06:00
										 |  |  |           {{ (small || tiny) ? "" : waitingTextCalculated }} | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |         </slot> | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | export default defineNuxtComponent({ | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  |   props: { | 
					
						
							|  |  |  |     loading: { | 
					
						
							| 
									
										
										
										
											2021-08-07 16:49:55 -08:00
										 |  |  |       type: Boolean, | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  |       default: true, | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2025-01-13 10:19:49 -06:00
										 |  |  |     tiny: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       default: false, | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |     small: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       default: false, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     medium: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       default: true, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     large: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       default: false, | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |     waitingText: { | 
					
						
							|  |  |  |       type: String, | 
					
						
							|  |  |  |       default: undefined, | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  |   setup(props) { | 
					
						
							|  |  |  |     const size = computed(() => { | 
					
						
							| 
									
										
										
										
											2025-01-13 10:19:49 -06:00
										 |  |  |       if (props.tiny) { | 
					
						
							|  |  |  |         return { | 
					
						
							|  |  |  |           width: 2, | 
					
						
							|  |  |  |           icon: 0, | 
					
						
							|  |  |  |           size: 25, | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  |       if (props.small) { | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |         return { | 
					
						
							|  |  |  |           width: 2, | 
					
						
							|  |  |  |           icon: 30, | 
					
						
							|  |  |  |           size: 50, | 
					
						
							|  |  |  |         }; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       } | 
					
						
							|  |  |  |       else if (props.large) { | 
					
						
							| 
									
										
										
										
											2021-05-29 15:54:18 -08:00
										 |  |  |         return { | 
					
						
							|  |  |  |           width: 4, | 
					
						
							|  |  |  |           icon: 120, | 
					
						
							|  |  |  |           size: 200, | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       return { | 
					
						
							|  |  |  |         width: 3, | 
					
						
							|  |  |  |         icon: 75, | 
					
						
							|  |  |  |         size: 125, | 
					
						
							|  |  |  |       }; | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     const i18n = useI18n(); | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |     const waitingTextCalculated = props.waitingText == null ? i18n.t("general.loading-recipes") : props.waitingText; | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       size, | 
					
						
							| 
									
										
										
										
											2023-04-25 12:46:00 -05:00
										 |  |  |       waitingTextCalculated, | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  |     }; | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  | }); | 
					
						
							| 
									
										
										
										
											2021-05-25 21:01:22 -07:00
										 |  |  | </script> |