<?php

// Currency Settings Helper Functions
function easy_invoice_get_currency_code() {
    return get_option('easy_invoice_currency_code', 'USD');
}

function easy_invoice_get_currency_position() {
    return get_option('easy_invoice_currency_position', 'left');
}

function easy_invoice_get_currency_symbol_type() {
    return get_option('easy_invoice_currency_symbol_type', 'symbol');
}

function easy_invoice_get_currency_symbol() {
    $currency_code = easy_invoice_get_currency_code();
    $currency_symbol_type = easy_invoice_get_currency_symbol_type();
    
    if ($currency_symbol_type === 'code') {
        return $currency_code;
    }
    
    return \EasyInvoice\Helpers\CurrencyHelper::getCurrencySymbol($currency_code);
}

function easy_invoice_get_thousands_separator() {
    return get_option('easy_invoice_thousands_separator', ',');
}

function easy_invoice_get_decimal_separator() {
    return get_option('easy_invoice_decimal_separator', '.');
}

function easy_invoice_get_decimal_precision() {
    return intval(get_option('easy_invoice_decimal_precision', 2));
}