import * as React from "react";
import { FormContext } from "../LajiForm";
import { FieldProps, JSONSchemaArray, JSONSchemaObject } from "../../types";
export declare const colIsLoading: (col: SortCol) => boolean;
interface SortCol {
    name: string;
    /**
     * Undefined if shouldn't sort at all.
     */
    descending?: boolean;
    /**
     * Compare function provided by the compare strategy. It can be asynchronously set.
     * If it returns undefined, comparison will fallback to the default algorithm.
    */
    compare?: (a: any, b: any, sortCol: SortCol, schema: any) => number | undefined;
    /**
     * The chosen compare strategy object.
    */
    compareStrategy: CompareStrategy;
    loading?: boolean;
}
interface State {
    uiSchema?: any;
    sortCols: SortCol[];
}
type DefaultCompareStrategy = {
    strategy: "default";
    noDescending?: boolean;
};
type TaxonomicCompareStrategy = {
    strategy: "taxonomic";
    noDescending?: boolean;
    valueField?: string;
    query: {
        informalGroupsFilter?: string;
        onlyFinnish?: boolean;
    };
};
type CompareStrategy = DefaultCompareStrategy | TaxonomicCompareStrategy;
/**
 * Sorts date according to selected columns. This component provides only the sorting logic,
 * a child component must handle the UI for selecting the sort columns.
 *
 * Can be used only if items are objects (non-objects don't have UUIDs which are used for
 * keeping the original order intact upon changes);
 */
export default class SortArrayField extends React.Component<FieldProps<JSONSchemaArray<JSONSchemaObject>>, State> {
    state: State;
    sortTimeIdToSortedIdx: Record<string, number>;
    /**
     * Id-to-idx mapping when the sorting was touched. Used to sorting newly items where they are put, instead of sorting them according to the sort cols.
    */
    sortTimeIdToOrigIdx: Record<string, number>;
    constructor(props: FieldProps<JSONSchemaArray<JSONSchemaObject>>);
    componentDidUpdate(): void;
    /**
     * Sort cols might be retrieved from settings JSON, which doesn't hold the 'compare' fn. We add the fn
     * asynchronously when the  component updates according to the comparison strategy name.
     */
    syncColumns(): void;
    getUiShema(props: FieldProps<JSONSchemaArray<JSONSchemaObject>>, { sortCols }: State, sortedData: any[]): {
        "ui:options": any;
        "ui:ArrayFieldTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTemplateProps<any, any, FormContext>> | undefined;
        "ui:ArrayFieldDescriptionTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldDescriptionProps<any, any, FormContext>> | undefined;
        "ui:ArrayFieldItemTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTemplateItemType<any, any, FormContext>> | undefined;
        "ui:ArrayFieldTitleTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTitleProps<any, any, FormContext>> | undefined;
        "ui:BaseInputTemplate"?: React.ComponentType<import("@rjsf/utils").WidgetProps<any, any, FormContext>> | undefined;
        "ui:DescriptionFieldTemplate"?: React.ComponentType<import("@rjsf/utils").DescriptionFieldProps<any, any, FormContext>> | undefined;
        "ui:ErrorListTemplate"?: React.ComponentType<import("@rjsf/utils").ErrorListProps<any, any, FormContext>> | undefined;
        "ui:FieldErrorTemplate"?: React.ComponentType<import("@rjsf/utils").FieldErrorProps<any, any, FormContext>> | undefined;
        "ui:FieldHelpTemplate"?: React.ComponentType<import("@rjsf/utils").FieldHelpProps<any, any, FormContext>> | undefined;
        "ui:FieldTemplate"?: React.ComponentType<import("@rjsf/utils").FieldTemplateProps<any, any, FormContext>> | undefined;
        "ui:ObjectFieldTemplate"?: React.ComponentType<import("@rjsf/utils").ObjectFieldTemplateProps<any, any, FormContext>> | undefined;
        "ui:TitleFieldTemplate"?: React.ComponentType<import("@rjsf/utils").TitleFieldProps<any, any, FormContext>> | undefined;
        "ui:UnsupportedFieldTemplate"?: React.ComponentType<import("@rjsf/utils").UnsupportedFieldProps<any, any, FormContext>> | undefined;
        "ui:WrapIfAdditionalTemplate"?: React.ComponentType<import("@rjsf/utils").WrapIfAdditionalTemplateProps<any, any, FormContext>> | undefined;
        "ui:classNames"?: string | undefined;
        "ui:style"?: React.StyleHTMLAttributes<any> | undefined;
        "ui:title"?: string | undefined;
        "ui:description"?: string | undefined;
        "ui:placeholder"?: string | undefined;
        "ui:help"?: string | undefined;
        "ui:autofocus"?: boolean | undefined;
        "ui:autocomplete"?: AutoFill | undefined;
        "ui:disabled"?: boolean | undefined;
        "ui:emptyValue"?: any;
        "ui:enumDisabled"?: (string | number | boolean)[] | undefined;
        "ui:hideError"?: boolean | undefined;
        "ui:readonly"?: boolean | undefined;
        "ui:order"?: string[] | undefined;
        "ui:addable"?: boolean | undefined;
        "ui:orderable"?: boolean | undefined;
        "ui:removable"?: boolean | undefined;
        "ui:inline"?: boolean | undefined;
        "ui:inputType"?: string | undefined;
        "ui:label"?: boolean | undefined;
        "ui:rows"?: number | undefined;
        "ui:submitButtonOptions"?: import("@rjsf/utils").UISchemaSubmitButtonOptions | undefined;
        "ui:widget"?: string | import("@rjsf/utils").Widget<any, any, FormContext> | undefined;
        "ui:duplicateKeySuffixSeparator"?: string | undefined;
        "ui:rootFieldId"?: string;
        "ui:field"?: string | import("@rjsf/utils").Field<any, any, FormContext> | undefined;
        "ui:fieldReplacesAnyOrOneOf"?: boolean;
    };
    getSortableColumns(props: FieldProps<JSONSchemaArray<JSONSchemaObject>>): string[] | undefined;
    getNextComponentProps(props: any, state: State): {
        uiSchema: {
            "ui:options": any;
            "ui:ArrayFieldTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTemplateProps<any, any, FormContext>> | undefined;
            "ui:ArrayFieldDescriptionTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldDescriptionProps<any, any, FormContext>> | undefined;
            "ui:ArrayFieldItemTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTemplateItemType<any, any, FormContext>> | undefined;
            "ui:ArrayFieldTitleTemplate"?: React.ComponentType<import("@rjsf/utils").ArrayFieldTitleProps<any, any, FormContext>> | undefined;
            "ui:BaseInputTemplate"?: React.ComponentType<import("@rjsf/utils").WidgetProps<any, any, FormContext>> | undefined;
            "ui:DescriptionFieldTemplate"?: React.ComponentType<import("@rjsf/utils").DescriptionFieldProps<any, any, FormContext>> | undefined;
            "ui:ErrorListTemplate"?: React.ComponentType<import("@rjsf/utils").ErrorListProps<any, any, FormContext>> | undefined;
            "ui:FieldErrorTemplate"?: React.ComponentType<import("@rjsf/utils").FieldErrorProps<any, any, FormContext>> | undefined;
            "ui:FieldHelpTemplate"?: React.ComponentType<import("@rjsf/utils").FieldHelpProps<any, any, FormContext>> | undefined;
            "ui:FieldTemplate"?: React.ComponentType<import("@rjsf/utils").FieldTemplateProps<any, any, FormContext>> | undefined;
            "ui:ObjectFieldTemplate"?: React.ComponentType<import("@rjsf/utils").ObjectFieldTemplateProps<any, any, FormContext>> | undefined;
            "ui:TitleFieldTemplate"?: React.ComponentType<import("@rjsf/utils").TitleFieldProps<any, any, FormContext>> | undefined;
            "ui:UnsupportedFieldTemplate"?: React.ComponentType<import("@rjsf/utils").UnsupportedFieldProps<any, any, FormContext>> | undefined;
            "ui:WrapIfAdditionalTemplate"?: React.ComponentType<import("@rjsf/utils").WrapIfAdditionalTemplateProps<any, any, FormContext>> | undefined;
            "ui:classNames"?: string | undefined;
            "ui:style"?: React.StyleHTMLAttributes<any> | undefined;
            "ui:title"?: string | undefined;
            "ui:description"?: string | undefined;
            "ui:placeholder"?: string | undefined;
            "ui:help"?: string | undefined;
            "ui:autofocus"?: boolean | undefined;
            "ui:autocomplete"?: AutoFill | undefined;
            "ui:disabled"?: boolean | undefined;
            "ui:emptyValue"?: any;
            "ui:enumDisabled"?: (string | number | boolean)[] | undefined;
            "ui:hideError"?: boolean | undefined;
            "ui:readonly"?: boolean | undefined;
            "ui:order"?: string[] | undefined;
            "ui:addable"?: boolean | undefined;
            "ui:orderable"?: boolean | undefined;
            "ui:removable"?: boolean | undefined;
            "ui:inline"?: boolean | undefined;
            "ui:inputType"?: string | undefined;
            "ui:label"?: boolean | undefined;
            "ui:rows"?: number | undefined;
            "ui:submitButtonOptions"?: import("@rjsf/utils").UISchemaSubmitButtonOptions | undefined;
            "ui:widget"?: string | import("@rjsf/utils").Widget<any, any, FormContext> | undefined;
            "ui:duplicateKeySuffixSeparator"?: string | undefined;
            "ui:rootFieldId"?: string;
            "ui:field"?: string | import("@rjsf/utils").Field<any, any, FormContext> | undefined;
            "ui:fieldReplacesAnyOrOneOf"?: boolean;
        };
        formData: any[];
        onChange: (formData: any[]) => void;
    };
    updateSortCol(sortCol: SortCol): void;
    setSortCols(sortCols: SortCol[]): void;
    onSortToggle(name: string): void;
    onChange: (formData: any[]) => void;
    render(): JSX.Element;
}
export {};
