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

figma.connect(
  'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=6-29469',
  {
    imports: ["import { Field } from '@mozaic-ds/web-components/svelte';"],
    props: {
      label: figma.string('Label'),
      showNecessityIndicator: figma.boolean('Necessity indicator'),
      showHelpText: figma.boolean('Help text'),
    },
    example: ({ label }) => (
      <Field
        id="field-id"
        label={label}
        requirementtext="required"
        helpid="field-help"
        helptext="Help text"
      >
        <input id="field-id" type="text" />
      </Field>
    ),
  },
);
