import React, { ReactElement, HTMLAttributes } from 'react'; import { IconLinkProps } from 'bloko/blocks/icon/IconLink'; import { InputProps } from 'bloko/blocks/inputText'; import { SuggestProps } from 'bloko/blocks/suggest'; import ImmutableSelectionStrategy from 'bloko/common/tree/immutableSelectionStrategy'; import TreeCollection from 'bloko/common/tree/treeCollection'; import { AdditionalDefault } from 'bloko/common/tree/types'; interface UseRenderInputProps { collection: TreeCollection; selectionStrategy: InstanceType; value: string[]; selected: string[]; excluded: string[]; withTagList: boolean; singleChoice?: boolean; maxItems?: number; showTreeSelectorPopup: React.MouseEventHandler; onBlur?: () => void; onFocus?: () => void; onChange?: (items: string[], excludedItems: string[]) => void; } type SuggestPropsType = Pick & Partial & { suggest?: boolean; }; type IconLinkPropsType = Partial & HTMLAttributes; interface UseRenderFunc { (props: { suggest?: boolean; iconLinkProps?: IconLinkPropsType; suggestProps?: SuggestPropsType; } & Partial): ReactElement | null; } export interface UseRenderInputHook { (props: UseRenderInputProps): UseRenderFunc; } declare const useRenderInput: UseRenderInputHook; export default useRenderInput;