/**
 * ابعاد استاندارد کاغذ (ISO A) به پیکسل - همان مقیاس ادیتور (A4 = 794×1123)
 */
export const PAPER_DIMENSIONS = {
  a3: { width: 1123, height: 1587 },
  a4: { width: 794, height: 1123 },
  a5: { width: 561, height: 794 },
} as const;

export type PaperSizeKey = keyof typeof PAPER_DIMENSIONS;

export function getPaperDimensions(size: string): { width: number; height: number } {
  const key = size?.toLowerCase() as PaperSizeKey;
  return PAPER_DIMENSIONS[key] ?? PAPER_DIMENSIONS.a4;
}
