import React from 'react';

type Option = {
  label: string;
  id: string;
  position: number;
  altId?: string;
  selected?: boolean;
  [key: string]: boolean | undefined;
};
type BulkActionProps = {
  enabled: boolean;
  bulkAddHelpDocUrl: string;
};
type OptionFieldsProps = {
  name?: string;
  error?: string;
  onDelete?: (index: number) => void;
  onClone?: (index: number) => void;
  onChange: (options: Option[], action?: OptionAction, index?: number) => void;
  onEdit?: (index: number) => void;
  onBlur?: (id: string, value: string) => void;
  buttonProps?: ButtonProps;
  minOptions?: number;
  draggable?: boolean;
  editable?: boolean;
  disabled?: boolean;
  isAddOptionEnabled?: boolean;
  isDeleteOptionEnabled?: boolean;
  isCloneOptionEnabled?: boolean;
  isCheckboxEnabled?: boolean;
  shouldResetEmptyOptionOnBlur?: boolean;
  isPictureChoice?: boolean;
  isTextArea?: boolean;
  isMultiInput?: boolean;
  isEditor?: boolean;
  inputConfig?: {
    type: "text" | "number";
    placeholder?: string;
    min?: number;
    max?: number;
    defaultValue?: string | number;
  }[];
  shouldDestroy?: boolean;
  destroyFlagName?: string;
  itemLabel?: string;
  isNewItemsPrefilled?: boolean;
  bulkActionProps?: BulkActionProps;
};
/**
 *
 * A component to add, edit, delete, and reorder options for multiple choice and
 *
 * single choice questions.
 *
 * @example 
 *
 * import OptionFields from "@bigbinary/neeto-molecules/OptionFields";
 * 
 * <Formik onReset={noop} onSubmit={noop}>
 *   <Form>
 *     <OptionFields
 *       name=""
 *       minOptions={2}
 *       options={[
 *         { id: "1", label: "Option 1", position: 1 },
 *         { id: "2", label: "Option 2", position: 2 },
 *         { id: "3", label: "Option 3", position: 3 },
 *       ]}
 *       onChange={noop}
 *       {...args}
 *     />
 *   </Form>
 * </Formik>;
 * @endexample
 * This component must be used inside a Formik component. The values from the
 *
 * component will be passed to the onChange function as an array of options.
 *
*/
declare const OptionFields: React.FC<OptionFieldsProps>;

export { OptionFields as default };
