import { SdBadgeColor } from '@sd-angular/core/badge';
export declare type SdGridMaterialColumn<T = any> = SdGridMaterialColumnText<T> | SdGridMaterialColumnNumber<T> | SdGridMaterialBool<T> | SdGridMaterialColumnDate<T> | SdGridMaterialColumnValues<T> | SdGridMaterialColumnImage<T> | SdGridMaterialColumnChildren<T> | SdGridMaterialColumnChildrenCol<T>;
export declare type SdFilterOperator = 'EQUAL' | 'NOT_EQUAL' | 'CONTAIN' | 'NOT_CONTAIN' | 'IN' | 'NOT_IN' | 'START_WITH' | 'END_WITH' | 'GREATER_THAN' | 'LESS_THAN' | 'GREATER_OR_EQUAL' | 'LESS_OR_EQUAL';
export declare const SdFilterOperators: {
    value: SdFilterOperator;
    symbol?: string;
    display: string;
}[];
export declare type TransformFunc<T = any> = (value: any, rowData: T, args?: {
    isExport?: boolean;
}) => string | Promise<string>;
interface SdGridMaterialBaseColumn<T = any> {
    field: string;
    title: string;
    titleHtml?: string;
    description?: string;
    width?: string;
    hidden?: boolean;
    invisible?: boolean;
    fixed?: boolean;
    align?: 'center' | 'left' | 'right';
    htmlTemplate?: (value: any, rowData: T, isMobileOrTablet: boolean) => string;
    transform?: TransformFunc<T>;
    tooltip?: (value: any, rowData: T) => string;
    click?: (value: any, rowData: T) => void;
    sortable?: boolean;
    filter?: {
        disabled?: boolean;
        defaultShowing?: boolean;
        default?: any;
        operator?: {
            enable?: boolean;
            list?: SdFilterOperator[];
        };
    };
    export?: {
        disabled?: boolean;
    };
}
interface SdGridMaterialColumnText<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'string';
    badge?: (value: any, rowData: T) => SdBadgeColor;
    badgeIcon?: (value: any, rowData: T) => string;
    badgeType?: 'circle' | 'icon';
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
        minLength?: number;
        maxLength?: number;
        validator?: (rowData: T) => string;
    };
}
interface SdGridMaterialColumnNumber<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'number';
    badge?: (value: any, rowData: T) => SdBadgeColor;
    badgeIcon?: (value: any, rowData: T) => string;
    badgeType?: 'circle' | 'icon';
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
        minValue?: number;
        maxValue?: number;
        precision?: number;
        validator?: (rowData: T) => string;
    };
}
interface SdGridMaterialBool<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'bool';
    option?: {
        displayOnTrue?: string;
        displayOnFalse?: string;
    };
    badgeType?: 'circle';
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
    };
}
interface SdGridMaterialColumnDate<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'date' | 'datetime' | 'time';
    option?: {
        useFilterDate?: boolean;
        timeDifferent?: 'second' | 'minute' | 'hour' | 'day' | 'month';
    };
    transformDate?: (value: any, rowData: T) => string | Date;
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
    };
}
export interface SdGridMaterialColumnValues<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'values';
    badge?: (value: any, rowData: T) => SdBadgeColor;
    badgeIcon?: (value: any, rowData: T) => string;
    badgeType?: 'circle' | 'icon';
    option: {
        items: any[] | ((searchText?: string, isFormValue?: boolean) => Promise<any[]>) | ((searchText?: string[], isFormValue?: boolean) => Promise<any[]>);
        valueField: string;
        displayField: string;
        selection?: 'AUTOCOMPLETE' | 'MULTIPLE' | 'MULTIPLEAUTOCOMPLETE' | 'AUTOCOMPLETE_EDITOR' | 'MULTIPLE_EDITOR' | 'MULTIPLEAUTOCOMPLETE_EDITOR';
    };
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        add?: (rowData: T) => void;
        edit?: (option: any, rowData: T) => void;
        delete?: (option: any, rowData: T) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
    };
}
interface SdGridMaterialColumnImage<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'image';
    option: {
        height: number;
        width: number;
    };
    editor?: {
        change?: (rowData: T, selected?: any) => void;
        hidden?: boolean | ((rowData: T) => boolean);
        disabled?: boolean | ((rowData: T) => boolean);
        required?: boolean | ((rowData: T) => boolean);
    };
}
declare type SdGridMaterialNormalColumn<T> = Exclude<Exclude<SdGridMaterialColumn<T>, SdGridMaterialColumnChildren<T>>, SdGridMaterialColumnChildrenCol<T>>;
export declare type SdGridMaterialChildColumn<T = any> = SdGridMaterialNormalColumn<T> & {
    dynamicTitle?: (rowData: T) => string | Promise<string>;
    colSpan: 1 | 2;
};
export interface SdGridMaterialColumnChildren<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'children';
    children: SdGridMaterialChildColumn<T>[];
}
export interface SdGridMaterialColumnChildrenCol<T = any> extends SdGridMaterialBaseColumn<T> {
    type: 'children-col';
    children: SdGridMaterialNormalColumn<T>[];
}
export {};
