// 生成占位图片的 SVG Data URI
export const getPlaceholderImage = (width: number = 200, height: number = 200, text: string = '商品图片'): string => {
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
    <rect width="100%" height="100%" fill="#f0f0f0"/>
    <text x="50%" y="50%" font-family="Arial, sans-serif" font-size="16" fill="#999" text-anchor="middle" dy=".3em">${text}</text>
  </svg>`;
  
  return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
};

export const PLACEHOLDER_PRODUCT = getPlaceholderImage(200, 200, '商品图片');
export const PLACEHOLDER_PRODUCT_SMALL = getPlaceholderImage(80, 80, '商品');
export const PLACEHOLDER_PRODUCT_LARGE = getPlaceholderImage(400, 400, '商品图片');
