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

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

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

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