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";
*
*
*
* ;
* @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;
export { OptionFields as default };