import { PricingFormatter } from './formatter'; import { PricingTranslator } from './translator'; import { CurrencyCode } from './types'; import { PricingValidator } from './validator'; import type { CurrencyPricePolicy, SupportedCurrency } from './policy'; import type { Currency, ExchangeRateMap, Price } from './types'; import type { PriceTextField } from '../../desktop/components'; /** * PricingService는 상품의 판매가, 할인, 통화 포맷 등 가격 관련 비즈니스 로직을 처리하는 도메인 서비스입니다 */ export declare class PricingService { private static instance; static getInstance(): PricingService; static format: typeof PricingFormatter; static translate: typeof PricingTranslator; static validate: typeof PricingValidator; private browserLanguage; static init(browserLanguage: string): void; setBrowserLanguage(locale: string): void; static getCurrency(currency: CurrencyCode): Currency; /** * publ이 지원하는 통화인지 반환합니다 */ static isSupportedCurrency(currency: string): currency is SupportedCurrency; /** * 채널의 통화 가격 정책을 반환합니다 */ static getCurrencyPricePolicy(channelCode: string, currency: CurrencyCode): CurrencyPricePolicy; /** * 유저의 선호 통화 기본값을 반환합니다 */ static getDefaultPreferredCurrency(userCountryCode?: string): CurrencyCode; /** * 환율 변환 유틸리티 * * @param amount 금액 (from 통화 기준) * @param from 원래 통화 * @param to 변환할 대상 통화 * @param exchangeRates 기준 통화 대비 환율 테이블 (예: { USD: 1, KRW: 1300, EUR: 0.9 }) * @returns 환산된 금액 (소수점 반올림 포함) */ static exchangePrice(amount: number, from: CurrencyCode, to: CurrencyCode, exchangeRates: ExchangeRateMap): number; /** * 기준 통화 상품 가격을 선호 통화 가격으로 변환합니다 * @param price 기준 통화의 상품 가격 * @param preferredCurrency 선호 통화 * @param exchangeRates 기준 통화 대비 환율 테이블 */ static convertToPreferredPrice(price: Price, preferredCurrency: CurrencyCode, exchangeRates: ExchangeRateMap): Price; /** * 채널 가격 정책 기반의 PriceTextField Props를 반환합니다 */ static getPriceTextFieldProps(channelCode: string, options: { currency: CurrencyCode; isPromotionPrice?: boolean; validation?: { useRequiredValidation?: 'none' | 'use'; customMinAmount?: number; customMaxAmount?: number; }; }): Partial[0]>; }