import { Component, inject } from '@angular/core'; import { PopupComponent } from '../../components/popup/popup'; import { Dropdown, DropdownOption } from '../../components/dropdown/dropdown'; import { Switch } from '../../components/switch/switch'; import { NgOptimizedImage } from '@angular/common'; import { PopupService } from '../../services/popup.service'; @Component({ selector: 'settings-popup', standalone: true, imports: [PopupComponent, Dropdown, Switch, NgOptimizedImage], templateUrl: './popup.html', styleUrl: './popup.scss', }) export class SettingsPopup { private popupService = inject(PopupService); languages: DropdownOption[] = [ { label: 'English', value: 'EN' }, { label: '한국어', value: 'KR' }, { label: '日本語', value: 'JP' }, ]; userName: string = "Guest"; /** * 팝업을 닫을 때, 자기 자신(클래스)을 명확하게 지정하여 닫습니다. */ close() { this.popupService.close(SettingsPopup); } }