import { Controller, Get } from "@nestjs/common";
import { Public } from "@bff/modules/auth/decorators/public.decorator.js";
import { WhmcsCurrencyService } from "../../integrations/whmcs/services/whmcs-currency.service.js";
import type { Currency } from "@customer-portal/domain/billing";

@Controller("currency")
export class CurrencyController {
  constructor(private readonly currencyService: WhmcsCurrencyService) {}

  @Public()
  @Get("default")
  getDefaultCurrency(): Currency {
    return this.currencyService.getDefaultCurrency();
  }

  @Public()
  @Get("all")
  getAllCurrencies(): Currency[] {
    return this.currencyService.getAllCurrencies();
  }
}
