import { Controller, Get } from '@nestjs/common'
import { ApiProduces, ApiTags } from '@nestjs/swagger'
import { COUNTRIES_LIST, CURRENCY_LIST, TIMEZONE_LIST } from './data'
import { CountryResponse, CurrencyResponse, TimezoneResponse } from './types'

@Controller('static')
@ApiTags('default')
export class staticController {
	@Get('countries')
	async getCountries(): Promise<CountryResponse[]> {
		return COUNTRIES_LIST
	}

	@Get('currencies')
	async getCurrencies(): Promise<CurrencyResponse[]> {
		return CURRENCY_LIST
	}

	@Get('timezones')
	@ApiProduces('application/json')
	async getTimezones(): Promise<TimezoneResponse[]> {
		return TIMEZONE_LIST
	}
}
