/**
 * Code Connect — Avatar / Avatar [General] + Group Avatar [General]
 * Figma 文件：U1BuNxmWivZoTfG2mJGh4N（General Library）
 * 节点：Avatar 组件（跨平台通用）
 */

import figma from '@figma/code-connect';
import { Avatar, GroupAvatar } from './src/components/Avatar/Avatar';

// Avatar [General]
figma.connect(Avatar, 'figma://file/U1BuNxmWivZoTfG2mJGh4N?node-id=3420:184127', {
  props: {
    size: figma.enum('Size', {
      '16': 16, '20': 20, '24': 24, '28': 28,
      '32': 32, '36': 36, '40': 40, '44': 44,
      '48': 48, '56': 56, '64': 64,
    }),
    clickable: figma.boolean('Clickable'),
  },
  example: ({ size, clickable }) => (
    <Avatar
      src="/path/to/avatar.png"
      size={size}
      clickable={clickable}
    />
  ),
});

// Group Avatar [General]
figma.connect(GroupAvatar, 'figma://file/U1BuNxmWivZoTfG2mJGh4N?node-id=3420:184200', {
  props: {
    size: figma.enum('Size', {
      '28': 28, '32': 32, '36': 36, '40': 40,
      '44': 44, '48': 48, '56': 56, '64': 64,
    }),
    grid: figma.enum('Grid', {
      '9×9': '3x3',
      '4×4': '2x2',
    }),
  },
  example: ({ size, grid }) => (
    <GroupAvatar
      srcs={[]}
      size={size}
      grid={grid}
    />
  ),
});
