/**
 * Code Connect — Search Box / Search Box [Desktop]
 * Figma 文件：0zsTetwqRuSKJRsyJJXcjg（Desktop Library）
 *             d4fzf03y40MuDBCBVNd4Pb（Foundation Desktop Library）
 * 节点：3910:225093（Desktop Library）
 *       1:393525 在 Foundation Desktop Library 中使用 Theme=Fill
 */

import figma from '@figma/code-connect';
import { SearchBox } from './src/components/SearchBox/SearchBox';

// Desktop Library 基础版（Theme=Outline）
figma.connect(SearchBox, 'figma://file/0zsTetwqRuSKJRsyJJXcjg?node-id=3910:225093', {
  props: {
    theme: figma.enum('Theme', {
      Fill:    'fill',
      Outline: 'outline',
    }),
    placeholder: figma.string('Placeholder Content'),
  },
  example: ({ theme, placeholder }) => (
    <SearchBox theme={theme} placeholder={placeholder} />
  ),
});

// Foundation Desktop Library 版（Theme=Fill，ChatList TopNav 使用）
figma.connect(SearchBox, 'figma://file/d4fzf03y40MuDBCBVNd4Pb?node-id=3910:225093', {
  props: {
    placeholder: figma.string('Placeholder Content'),
  },
  example: ({ placeholder }) => (
    <SearchBox theme="fill" placeholder={placeholder} />
  ),
});
