/**
 * @alqove/shared
 *
 * Shared hooks, utilities, and business logic.
 * Platform-specific code (components, navigation, native APIs) stays in web/ and mobile/.
 */

/**
 * Format cents to display price.
 * @example formatPrice(1299) => "$12.99"
 */
export function formatPrice(cents: number): string {
  return `$${(cents / 100).toFixed(2)}`;
}

/**
 * Convert dollars to cents.
 * @example dollarsToCents(12.99) => 1299
 */
export function dollarsToCents(dollars: number): number {
  return Math.round(dollars * 100);
}
