import * as React from "react";
import type { Position } from "../util";
import type { LinterContextProps } from "@khanacademy/perseus-linter";
type Layout = "horizontal" | "vertical";
declare enum ItemState {
    STATIC = "static",
    DRAGGING = "dragging",
    ANIMATING = "animating",
    DISABLED = "disabled"
}
export type SortableOption = string;
type SortableProps = {
    constraints: {
        width: number;
        height: number;
    } | Record<any, any>;
    disabled: boolean;
    layout: Layout;
    margin: number;
    onChange: (arg1: any) => void;
    onMeasure: (arg1: {
        widths: ReadonlyArray<number>;
        heights: ReadonlyArray<number>;
    }) => void;
    padding: boolean;
    linterContext: LinterContextProps;
    options: ReadonlyArray<SortableOption>;
    waitForTexRendererToLoad: boolean;
};
type DefaultProps = {
    constraints: SortableProps["constraints"];
    disabled: SortableProps["disabled"];
    layout: SortableProps["layout"];
    margin: SortableProps["margin"];
    onChange: SortableProps["onChange"];
    onMeasure: SortableProps["onMeasure"];
    padding: SortableProps["padding"];
    linterContext: SortableProps["linterContext"];
    waitForTexRendererToLoad: SortableProps["waitForTexRendererToLoad"];
};
type SortableItem = {
    option: SortableOption;
    key: number;
    state: ItemState;
    endPosition?: Position;
    width: number;
    height: number;
};
type SortableState = {
    items: ReadonlyArray<SortableItem>;
    texRendererLoaded: boolean;
};
declare class Sortable extends React.Component<SortableProps, SortableState> {
    static defaultProps: DefaultProps;
    remeasureItems: () => void;
    static itemsFromProps(props: {
        disabled: boolean;
        options: ReadonlyArray<SortableOption>;
    }): ReadonlyArray<SortableItem>;
    static clearItemMeasurements(items: ReadonlyArray<SortableItem>): ReadonlyArray<SortableItem>;
    constructor(props: SortableProps);
    UNSAFE_componentWillReceiveProps(nextProps: SortableProps): void;
    componentDidUpdate(): void;
    measureItems(): void;
    onMouseDown(key: SortableItem["key"]): void;
    moveOptionToIndex(option: SortableOption, index: number): void;
    onMouseMove(key: SortableItem["key"]): void;
    onMouseUp(key: SortableItem["key"]): void;
    onAnimationEnd(key: SortableItem["key"]): void;
    getOptions(): ReadonlyArray<SortableOption>;
    render(): React.ReactNode;
}
export default Sortable;
