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

figma.connect(
  'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=11975-12550',
  {
    imports: ["import { FileUploaderItem } from '@mozaic-ds/web-components/svelte';"],
    props: {
      format: figma.enum('🚫 Format', {
        'Inline (default)': 'inline',
        Stacked: 'stacked',
      }),
      valid: figma.enum('Is invalid', {
        False: true,
        True: false,
      }),
      uploading: figma.enum('Is uploading', {
        False: false,
        True: true,
      }),
      hasInformation: figma.boolean('Has information'),
      hasPreviewFeature: figma.boolean('Has preview feature'),
    },
    example: ({ format, valid }) => (
      <FileUploaderItem
        format={format}
        valid={valid}
        information="Additional information"
        deletebuttonlabel="Delete"
      ></FileUploaderItem>
    ),
  },
);
