23 lines
		
	
	
		
			599 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			599 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
								 | 
							
								export default defineNuxtPlugin(() => {
							 | 
						||
| 
								 | 
							
								  return {
							 | 
						||
| 
								 | 
							
								    provide: {
							 | 
						||
| 
								 | 
							
								      // 통화 포맷팅 함수 제공
							 | 
						||
| 
								 | 
							
								      formatCurrency: (amount: number): string => {
							 | 
						||
| 
								 | 
							
								        return new Intl.NumberFormat("ko-KR", {
							 | 
						||
| 
								 | 
							
								          style: "currency",
							 | 
						||
| 
								 | 
							
								          currency: "KRW",
							 | 
						||
| 
								 | 
							
								        }).format(amount);
							 | 
						||
| 
								 | 
							
								      },
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								      // 알림 표시 함수
							 | 
						||
| 
								 | 
							
								      showNotification: (
							 | 
						||
| 
								 | 
							
								        message: string,
							 | 
						||
| 
								 | 
							
								        type: "success" | "error" | "warning" = "success"
							 | 
						||
| 
								 | 
							
								      ) => {
							 | 
						||
| 
								 | 
							
								        console.log(`[${type.toUpperCase()}] ${message}`);
							 | 
						||
| 
								 | 
							
								        // 실제로는 토스트 알림 라이브러리 사용
							 | 
						||
| 
								 | 
							
								      },
							 | 
						||
| 
								 | 
							
								    },
							 | 
						||
| 
								 | 
							
								  };
							 | 
						||
| 
								 | 
							
								});
							 |