import type { TableColumn as TableColumnWSR } from '@wix/design-system';
import type { KeyedItem, SortMode, SortOrder } from '@wix/bex-core';
import { CSSProperties, ReactNode } from 'react';
import type { FieldType } from '../utils/fieldTypePrefixIcons';
import type { ValidationRule } from '../state/EditableTable/types';
type TableColumnBase<T = any> = Omit<TableColumnWSR<T>, 'sortDescending' | 'sortable' | 'infoTooltipProps' | 'style' | 'titleSuffix'> & {
    style?: CSSProperties | ((column: TableColumnWSR, rowData: KeyedItem<T>, rowNum: number) => CSSProperties);
    reorderDisabled?: boolean;
    defaultSortOrder?: SortOrder;
    sortMode?: SortMode;
    searchable?: boolean;
    infoTooltipProps?: TableColumnWSR['infoTooltipProps'] & {
        panelContent?: ReactNode;
    };
    mobile?: ColumnMobileConfig;
    /**
     * The field type string used to resolve a prefix icon for the column.
     * Cairo maps this to the appropriate icon internally.
     * @external
     */
    fieldType?: FieldType;
    /**
     * Whether the field contains personally identifiable information.
     * @external
     */
    isPii?: boolean;
    /**
     * only for cms. Whether this is a system-managed field.
     * @external
     */
    isSystem?: boolean;
    /**
     * Whether this is the primary display field.
     * @external
     */
    isPrimary?: boolean;
    /**
     * Column-level validation rules. When a `required` rule is present, a required indicator is shown in the custom columns panel.
     * @external
     */
    validation?: ValidationRule[];
};
interface TableColumnOptional<T> extends TableColumnBase<T> {
    id?: string;
    name?: string;
    hiddenFromCustomColumnsSelection?: undefined | true;
    hideable?: undefined;
    defaultHidden?: undefined;
}
interface TableColumnCustom<T> extends TableColumnBase<T> {
    id: string;
    name: string;
    hiddenFromCustomColumnsSelection?: false;
    hideable?: true;
    defaultHidden?: boolean;
}
interface TableColumnCustomOptionalName<T> extends TableColumnBase<T> {
    id: string;
    name?: string;
    title: TableColumnBase['title'];
    hiddenFromCustomColumnsSelection?: false;
    hideable?: true;
    defaultHidden?: boolean;
}
interface TableColumnCustomDefaultHidden<T> extends TableColumnBase<T> {
    id: string;
    name?: string;
    title: TableColumnBase['title'];
    hiddenFromCustomColumnsSelection?: false;
    hideable: false;
    defaultHidden?: undefined | false;
}
export type CustomColumnConfig<T> = TableColumnOptional<T> | TableColumnCustom<T> | TableColumnCustomDefaultHidden<T> | TableColumnCustomOptionalName<T>;
export interface SortableColumnConfig<T> extends TableColumnBase<T> {
    id: string;
    sortable: true;
}
export interface NotSortableColumnConfig<T> extends TableColumnBase<T> {
    id?: string;
    sortable?: false;
}
export type SortableConfig<T> = SortableColumnConfig<T> | NotSortableColumnConfig<T>;
export type TableColumn<T> = CustomColumnConfig<T> & SortableConfig<T>;
export type ColumnMobileConfig = {
    /**
     * Which mobile column to display in.
     * - 'first': Stacks vertically with other 'first' columns
     * - 'second': Displays as standalone second column
     * - undefined: Hidden on mobile
     */
    column: 'first';
    /**
     * Sort order within 'first' column (lower appears higher).
     * Only relevant when column is 'first'.
     * @default Infinity
     */
    order?: number;
} | {
    /**
     * Which mobile column to display in.
     * - 'first': Stacks vertically with other 'first' columns
     * - 'second': Displays as standalone second column
     * - undefined: Hidden on mobile
     */
    column?: 'second';
};
export interface Column {
    /**
     * A unique identifier for the column. This value is required to enable [custom columns](./?path=/story/features-display-custom-columns--overview) or [sortable columns](./?path=/story/features-sort-sortable-columns-sortable-columns--sortable-columns).
     * @external
     */
    id: string;
    /**
     * A name for the column. This value is shown in the [custom columns](./?path=/story/features-display-custom-columns--overview) dropdown.
     * @external
     */
    name: string;
    /**
     * The text to be shown at the top of the column.
     * @external
     */
    title: TableColumnBase['title'];
    /**
     * Hides the column from the custom column selection panel, making it always visible. Relevant for [custom columns](./?path=/story/features-display-custom-columns--overview).
     * @external
     */
    hiddenFromCustomColumnsSelection?: boolean;
    /**
     * When `false`, the column is always selected and displayed. Relevant for [custom columns](./?path=/story/features-display-custom-columns--overview).
     */
    hideable?: boolean;
    /**
     * When `true`, search matches in the column's values will be highlighted. Mark a column as searchable only if iy's data is relevant for your search.
     */
    searchable?: boolean;
    /**
     * When `true`, disables drag and drop for the column.
     * @external
     */
    reorderDisabled?: boolean;
    /**
     * When `true`, makes the column a [sortable column](./?path=/story/features-sort-sortable-columns-sortable-columns--sortable-columns).
     * @external
     */
    sortable?: boolean;
    sortDescending?: boolean;
    sortMode?: SortMode;
    /**
     * Determines the default sort order for the column, either `asc` or `desc`. The column must be a [sortable column](./?path=/story/features-sort-sortable-columns-sortable-columns--sortable-columns).
     * @external
     */
    defaultSortOrder?: SortOrder;
    /**
     * For [custom columns](./?path=/story/features-display-custom-columns--overview), when `true`, this property causes the column to be unchecked and thus not shown by default. This isn't relevant when `hideable` `=` `false`.
     * @external
     */
    defaultHidden?: boolean;
    dataExtension?: {
        id: string;
        editable: boolean;
        isPii?: boolean;
    };
    /**
     * Whether the field contains personally identifiable information.
     * @external
     */
    isPii?: boolean;
    /**
     * only for cms. Whether this is a system-managed field.
     * @external
     */
    isSystem?: boolean;
    /**
     * Whether this is the primary display field.
     * @external
     */
    isPrimary?: boolean;
    /**
     * Column-level validation rules. When a `required` rule is present, a required indicator is shown in the custom columns panel.
     * @external
     */
    validation?: ValidationRule[];
    infoTooltipProps?: {
        content?: ReactNode;
        panelContent?: ReactNode;
    };
    /**
     * A callback that is called for each row in the data to display the value of this row for the specified column.
     * @external
     */
    render: TableColumnWSR['render'];
    width?: TableColumnWSR['width'];
    style?: TableColumnWSR['style'];
    /**
     * Mobile column configuration. Determines how this column is displayed on mobile devices.
     * - column: 'first' - Stacks vertically with other 'first' columns
     * - column: 'second' - Displays as standalone second column
     * - undefined - Hidden on mobile
     * @external
     */
    mobile?: ColumnMobileConfig;
    /**
     * The field type string used to resolve a prefix icon for the column.
     * Cairo maps this to the appropriate icon internally.
     * @external
     */
    fieldType?: FieldType;
}
export {};
//# sourceMappingURL=tableColumn.d.ts.map