import { ButtonHTMLAttributes } from 'react';
import * as enUS from './locales/en-US.json';
import { InputHTMLAttributes } from 'react';
import { PropsWithChildren } from 'react';
import { default as React_2 } from 'react';
import { ReactNode } from 'react';
import { RowSelectionState } from '@tanstack/react-table';
import { TableOptions } from '@tanstack/react-table';

export declare interface BaseProps<T extends Row = Row> {
    columns: Column<T>[];
    rows: T[];
    isLoading?: boolean;
    enableRowSelection?: boolean | ((row: T) => boolean);
    onRowSelectionChange?: (newSelection: RowSelectionState) => void;
    rowSelection?: RowSelectionState;
}

export declare const Button: React_2.ForwardRefExoticComponent<Props & React_2.RefAttributes<HTMLButtonElement>>;

export declare const Checkbox: ({ indeterminate, className, checked, label, text, rightText, state, ...props }: Props_3) => React_2.JSX.Element;

export declare const CheckboxGroup: ({ children, state, text, rightText, }: PropsWithChildren & FieldProps) => React_2.JSX.Element;

export declare interface Column<T extends Row = Row> {
    field?: string;
    headerName?: string;
    highlight?: boolean;
    renderCell?: (params: {
        row: T;
    }) => React_2.ReactNode;
    enableSorting?: boolean;
}

export declare const CunninghamProvider: ({ currentLocale, customLocales, children, }: Props_9) => React_2.JSX.Element;

export declare const DataGrid: ({ columns, rows, pagination, sortModel, onSortModelChange, isLoading, enableRowSelection, onRowSelectionChange, rowSelection, tableOptions, displayHeader, }: Props_2) => React_2.JSX.Element;

export declare const DataList: ({ rows, ...props }: BaseProps) => React_2.JSX.Element;

export declare const DEFAULT_LOCALE = Locales.enUS;

export declare type DefaultTokens = PartialNested<typeof tokens>;

export declare const defaultTokens: {
    theme: {
        colors: {
            "primary-text": string;
            "primary-100": string;
            "primary-200": string;
            "primary-300": string;
            "primary-400": string;
            "primary-500": string;
            "primary-600": string;
            "primary-700": string;
            "primary-800": string;
            "primary-900": string;
            "secondary-text": string;
            "secondary-100": string;
            "secondary-200": string;
            "secondary-300": string;
            "secondary-400": string;
            "secondary-500": string;
            "secondary-600": string;
            "secondary-700": string;
            "secondary-800": string;
            "secondary-900": string;
            "greyscale-000": string;
            "greyscale-100": string;
            "greyscale-200": string;
            "greyscale-300": string;
            "greyscale-400": string;
            "greyscale-500": string;
            "greyscale-600": string;
            "greyscale-700": string;
            "greyscale-800": string;
            "greyscale-900": string;
            "success-text": string;
            "success-100": string;
            "success-200": string;
            "success-300": string;
            "success-400": string;
            "success-500": string;
            "success-600": string;
            "success-700": string;
            "success-800": string;
            "success-900": string;
            "info-text": string;
            "info-100": string;
            "info-200": string;
            "info-300": string;
            "info-400": string;
            "info-500": string;
            "info-600": string;
            "info-700": string;
            "info-800": string;
            "info-900": string;
            "warning-text": string;
            "warning-100": string;
            "warning-200": string;
            "warning-300": string;
            "warning-400": string;
            "warning-500": string;
            "warning-600": string;
            "warning-700": string;
            "warning-800": string;
            "warning-900": string;
            "danger-text": string;
            "danger-100": string;
            "danger-200": string;
            "danger-300": string;
            "danger-400": string;
            "danger-500": string;
            "danger-600": string;
            "danger-700": string;
            "danger-800": string;
            "danger-900": string;
        };
        font: {
            sizes: {
                h1: string;
                h2: string;
                h3: string;
                h4: string;
                h5: string;
                h6: string;
                l: string;
                m: string;
                s: string;
            };
            weights: {
                thin: number;
                regular: number;
                medium: number;
                bold: number;
                extrabold: number;
                black: number;
            };
            families: {
                base: string;
                accent: string;
            };
        };
        spacings: {
            xl: string;
            l: string;
            b: string;
            s: string;
            t: string;
            st: string;
        };
        transitions: {
            "ease-in": string;
            "ease-out": string;
            "ease-in-out": string;
            duration: string;
        };
    };
    components: {
        "forms-switch": {
            "accent-color": string;
            "rail-background-color": string;
            "rail-background-color--disabled": string;
            "rail-border-radius": string;
            "handle-background-color": string;
            "handle-background-color--disabled": string;
            "handle-border-radius": string;
        };
        "forms-select": {
            "border-color": string;
            "border-color--focus": string;
            "border-color--hover": string;
            "border-radius": string;
            "border-radius--focus": string;
            "border-radius--hover": string;
            "border-style": string;
            "border-width": string;
            color: string;
            "font-size": string;
            height: string;
            "item-background-color--hover": string;
            "item-background-color--selected": string;
            "item-color": string;
            "item-color--disabled": string;
            "item-font-size": string;
            "background-color": string;
            "menu-background-color": string;
            "label-color--focus": string;
        };
        "forms-radio": {
            "border-color": string;
            "accent-color": string;
        };
        "forms-input": {
            "font-weight": number;
            "font-size": string;
            "border-radius": string;
            "border-radius--hover": string;
            "border-radius--focus": string;
            "border-width": string;
            "border-color": string;
            "border-color--hover": string;
            "border-color--focus": string;
            "border-style": string;
            color: string;
            "label-color--focus": string;
        };
        "forms-field": {
            width: string;
            "font-size": string;
            color: string;
        };
        "forms-checkbox": {
            "background-color--hover": string;
            "font-size": string;
            "font-weight": number;
            color: string;
            "border-color": string;
            "border-radius": string;
            "accent-color": string;
            size: string;
        };
        button: {
            "border-radius": string;
            "border-radius--active": string;
            "medium-height": string;
            "small-height": string;
            "medium-font-size": string;
            "small-font-size": string;
            "font-weight": number;
        };
    };
};

export declare const Field: ({ children, state, text, rightText, fullWidth, compact, className, }: Props_4) => React_2.JSX.Element;

export declare type FieldProps = {
    state?: FieldState | undefined;
    text?: string | undefined;
    rightText?: string | undefined;
    fullWidth?: boolean | undefined;
    compact?: boolean | undefined;
    className?: string | undefined;
};

export declare type FieldState = "success" | "error" | "default";

export declare const Input: React_2.ForwardRefExoticComponent<React_2.InputHTMLAttributes<HTMLInputElement> & FieldProps & {
    label?: string | undefined;
    icon?: ReactNode;
    rightIcon?: ReactNode;
    charCounter?: boolean | undefined;
    charCounterMax?: number | undefined;
} & React_2.RefAttributes<InputRefType>>;

export declare interface InputRefType {
    input: HTMLInputElement | null;
}

export declare const Loader: (props: Props_8) => React_2.JSX.Element;

declare enum Locales {
    enUS = "en-US",
    frFR = "fr-FR"
}

declare interface Option_2 {
    value?: string;
    label: string;
    disabled?: boolean;
}

export declare const Pagination: ({ page, onPageChange, pagesCount, }: PaginationProps) => React_2.JSX.Element | null;

export declare interface PaginationProps {
    /** Current page */
    page: number;
    /** Called when page need to change */
    onPageChange: (page: number) => void;
    /** Total number of pages */
    pagesCount?: number;
    /** Total number of items per page */
    pageSize: number;
}

declare type PartialNested<T> = {
    [K in keyof T]?: T extends object ? PartialNested<T[K]> : T[K];
};

declare interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
    color?: "primary" | "secondary" | "tertiary" | "danger";
    size?: "medium" | "small";
    icon?: ReactNode;
    iconPosition?: "left" | "right";
    active?: boolean;
}

declare interface Props_2<T extends Row = Row> extends BaseProps<T> {
    pagination?: PaginationProps;
    sortModel?: SortModel;
    onSortModelChange?: (newSortModel: SortModel) => void;
    /** Options for the underlying tanstack table. */
    tableOptions?: TableOptions<Row>;
    displayHeader?: boolean;
}

declare type Props_3 = InputHTMLAttributes<HTMLInputElement> & FieldProps & {
    indeterminate?: boolean;
    label?: string;
};

declare type Props_4 = FieldProps & PropsWithChildren;

declare type Props_5 = InputHTMLAttributes<HTMLInputElement> & FieldProps & {
    label?: string;
};

declare type Props_6 = PropsWithChildren & FieldProps & {
    label: string;
    hideLabel?: boolean;
    options: Option_2[];
    searchable?: boolean;
    name?: string;
    defaultValue?: string | number;
    value?: string | number;
    onChange?: (event: {
        target: {
            value: string | number | undefined;
        };
    }) => void;
    disabled?: boolean;
    clearable?: boolean;
};

declare type Props_7 = InputHTMLAttributes<HTMLInputElement> & FieldProps & {
    label?: string;
    labelSide?: "left" | "right";
};

declare interface Props_8 {
    "aria-label"?: string;
}

declare interface Props_9 extends PropsWithChildren {
    customLocales?: Record<string, TranslationSet>;
    currentLocale?: string;
}

export declare const Radio: ({ label, text, state, ...props }: Props_5) => React_2.JSX.Element;

export declare const RadioGroup: ({ children, state, text, rightText, }: PropsWithChildren & FieldProps) => React_2.JSX.Element;

export declare interface Row extends Record<string, any> {
    id: string;
}

export declare const Select: (props: Props_6) => React_2.JSX.Element;

/**
 * Handles sorting, pagination.
 */
export declare const SimpleDataGrid: ({ rows, defaultPaginationParams, defaultSortModel, ...props }: BaseProps<Row> & {
    /** Pagination default props, should never change. */
    defaultPaginationParams?: boolean | {
        defaultPage?: number | undefined;
        defaultPagesCount?: number | undefined;
        pageSize?: number | undefined;
    } | undefined;
    /** Pagination default props, should never change. */
    defaultSortModel?: SortModel | undefined;
}) => React_2.JSX.Element;

export declare type SortModel = {
    field: string;
    sort: "asc" | "desc" | null;
}[];

export declare const SUPPORTED_LOCALES: Locales[];

export declare const Switch: ({ label, text, state, fullWidth, labelSide, ...props }: Props_7) => React_2.JSX.Element;

declare const tokens: {
    theme: {
        colors: {
            "primary-text": string;
            "primary-100": string;
            "primary-200": string;
            "primary-300": string;
            "primary-400": string;
            "primary-500": string;
            "primary-600": string;
            "primary-700": string;
            "primary-800": string;
            "primary-900": string;
            "secondary-text": string;
            "secondary-100": string;
            "secondary-200": string;
            "secondary-300": string;
            "secondary-400": string;
            "secondary-500": string;
            "secondary-600": string;
            "secondary-700": string;
            "secondary-800": string;
            "secondary-900": string;
            "greyscale-000": string;
            "greyscale-100": string;
            "greyscale-200": string;
            "greyscale-300": string;
            "greyscale-400": string;
            "greyscale-500": string;
            "greyscale-600": string;
            "greyscale-700": string;
            "greyscale-800": string;
            "greyscale-900": string;
            "success-text": string;
            "success-100": string;
            "success-200": string;
            "success-300": string;
            "success-400": string;
            "success-500": string;
            "success-600": string;
            "success-700": string;
            "success-800": string;
            "success-900": string;
            "info-text": string;
            "info-100": string;
            "info-200": string;
            "info-300": string;
            "info-400": string;
            "info-500": string;
            "info-600": string;
            "info-700": string;
            "info-800": string;
            "info-900": string;
            "warning-text": string;
            "warning-100": string;
            "warning-200": string;
            "warning-300": string;
            "warning-400": string;
            "warning-500": string;
            "warning-600": string;
            "warning-700": string;
            "warning-800": string;
            "warning-900": string;
            "danger-text": string;
            "danger-100": string;
            "danger-200": string;
            "danger-300": string;
            "danger-400": string;
            "danger-500": string;
            "danger-600": string;
            "danger-700": string;
            "danger-800": string;
            "danger-900": string;
        };
        font: {
            sizes: {
                h1: string;
                h2: string;
                h3: string;
                h4: string;
                h5: string;
                h6: string;
                l: string;
                m: string;
                s: string;
            };
            weights: {
                thin: number;
                regular: number;
                medium: number;
                bold: number;
                extrabold: number;
                black: number;
            };
            families: {
                base: string;
                accent: string;
            };
        };
        spacings: {
            xl: string;
            l: string;
            b: string;
            s: string;
            t: string;
            st: string;
        };
        transitions: {
            "ease-in": string;
            "ease-out": string;
            "ease-in-out": string;
            duration: string;
        };
    };
    components: {
        "forms-switch": {
            "accent-color": string;
            "rail-background-color": string;
            "rail-background-color--disabled": string;
            "rail-border-radius": string;
            "handle-background-color": string;
            "handle-background-color--disabled": string;
            "handle-border-radius": string;
        };
        "forms-select": {
            "border-color": string;
            "border-color--focus": string;
            "border-color--hover": string;
            "border-radius": string;
            "border-radius--focus": string;
            "border-radius--hover": string;
            "border-style": string;
            "border-width": string;
            color: string;
            "font-size": string;
            height: string;
            "item-background-color--hover": string;
            "item-background-color--selected": string;
            "item-color": string;
            "item-color--disabled": string;
            "item-font-size": string;
            "background-color": string;
            "menu-background-color": string;
            "label-color--focus": string;
        };
        "forms-radio": {
            "border-color": string;
            "accent-color": string;
        };
        "forms-input": {
            "font-weight": number;
            "font-size": string;
            "border-radius": string;
            "border-radius--hover": string;
            "border-radius--focus": string;
            "border-width": string;
            "border-color": string;
            "border-color--hover": string;
            "border-color--focus": string;
            "border-style": string;
            color: string;
            "label-color--focus": string;
        };
        "forms-field": {
            width: string;
            "font-size": string;
            color: string;
        };
        "forms-checkbox": {
            "background-color--hover": string;
            "font-size": string;
            "font-weight": number;
            color: string;
            "border-color": string;
            "border-radius": string;
            "accent-color": string;
            size: string;
        };
        button: {
            "border-radius": string;
            "border-radius--active": string;
            "medium-height": string;
            "small-height": string;
            "medium-font-size": string;
            "small-font-size": string;
            "font-weight": number;
        };
    };
};

declare type TranslationSet = PartialNested<typeof enUS>;

export declare const useCunningham: () => {
    t: (key: string, vars?: Record<string, string | number>) => string;
};

export declare const usePagination: ({ defaultPage, defaultPagesCount, pageSize, }: {
    /** Default current page */
    defaultPage?: number | undefined;
    /** Default total number of pages */
    defaultPagesCount?: number | undefined;
    /** Total number of items per page */
    pageSize?: number | undefined;
}) => {
    page: number;
    setPage: React_2.Dispatch<React_2.SetStateAction<number>>;
    onPageChange: React_2.Dispatch<React_2.SetStateAction<number>>;
    pagesCount: number | undefined;
    setPagesCount: React_2.Dispatch<React_2.SetStateAction<number | undefined>>;
    pageSize: number;
};

export { }
