import figma from '@figma/code-connect';

figma.connect(
  'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-21651',
  {
    imports: ["import { KpiItem } from '@mozaic-ds/web-components/svelte';"],
    props: {
      value: figma.string('Value'),
      label: figma.string('KPI label'),
      size: figma.enum('Size', {
        'S (Badge)': 's',
        'M (Inline)': 'm',
        'L (Card)': 'l',
      }),
      status: figma.enum('Status', {
        Information: 'info',
        Success: 'success',
        Warning: 'warning',
        Error: 'error',
        Neutral: 'neutral',
      }),
      showTrend: figma.boolean('Show trend'),
    },
    example: ({ value, label, size, status }) => (
      <KpiItem
        value={value}
        label={label}
        size={size}
        status={status}
        trend="increasing"
        information="Expected value"
      ></KpiItem>
    ),
  },
);
