/**
 * Code Connect — Button / Button [Desktop]
 * 将 Figma 组件变体映射到 @wecom-ui/desktop 的 Button 组件
 *
 * Figma 文件：0zsTetwqRuSKJRsyJJXcjg（💿 Desktop Library）
 * 组件节点：2524:8761（Button / Button [Desktop]）
 */

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

figma.connect(Button, 'figma://file/0zsTetwqRuSKJRsyJJXcjg?node-id=2524:8761', {
  props: {
    color: figma.enum('Color', {
      Blue:  'blue',
      Gray:  'gray',
      Clear: 'clear',
      White: 'white',
      Red:   'red',
    }),
    layout: figma.enum('Layout', {
      Icon:      'icon',
      Text:      'text',
      'Icon+Text': 'icon-text',
    }),
    disabled: figma.enum('State', {
      Disabled: true,
      Normal:   false,
      Hover:    false,
      Pressed:  false,
    }),
    chevron: figma.boolean('Chevron'),
    icon: figma.instance('Content Slot'),
  },
  example: ({ color, layout, disabled, chevron, icon }) => (
    <Button
      color={color}
      layout={layout}
      disabled={disabled}
      chevron={chevron}
      icon={icon}
    />
  ),
});
