<?php
if (!defined('ABSPATH')) exit;

function simpinby_get_currency_symbol($code) {
  $map = [
    "INR" => "₹",
    "USD" => "$",
    "EUR" => "€",
    "GBP" => "£",
    "AED" => "د.إ",
    "SAR" => "﷼",
    "CAD" => "$",
    "AUD" => "$",
  ];
  return $map[$code] ?? "₹";
}

function simpinby_get_currency() {
  $pdf = get_option("simpinby_pdf_settings", []);
  $code = $pdf["currency_code"] ?? "INR";
  return [
    "code" => $code,
    "symbol" => simpinby_get_currency_symbol($code)
  ];
}
