import 'rollup-plugin-inject-process-env'; import { FC } from "react"; import { FormDropdownInput } from "stentor-models"; import { FormFieldProps } from "../FormDisplay"; /** * Matches the mobile breakpoint used throughout the form widget stylesheets. */ export declare const MOBILE_MEDIA_QUERY = "(max-width: 640px)"; /** * Extended SelectableItem interface to support free-form text input for dropdown items. * This allows dropdown options to trigger an additional text input field when selected. * * Note: This extends the stentor-models SelectableItem type with additional properties. * Consider adding these properties to stentor-models SelectableItem in a future release * if this pattern becomes widely used across the platform. */ export interface SelectableItemWithFreeForm { label: string; id: string; selected?: boolean; /** * If true, shows a free-form text input field when this item is selected. * Useful for "Other" options that require additional user input. */ freeFormInput?: boolean; /** * Custom field name for the free-form input value. * Defaults to "message" if not specified. * This allows multiple dropdowns to have different free-form field names. */ freeFormFieldName?: string; } export interface FormDropdownProps extends FormFieldProps { readonly field: FormDropdownInput; } export declare const FormFieldDropdown: FC; export default FormFieldDropdown;