import { QdDataFacetsChipConfig } from '../../core/data-facets/chip/data-facets-chip.interfaces';
import { QdDataFacetsCurrencyConfig } from '../../core/data-facets/currency/data-facets-currency.interfaces';
import { QdDataFacetsDateConfig } from '../../core/data-facets/date/data-facets-date.interfaces';
import { QdDataFacetsLinkConfig } from '../../core/data-facets/link/data-facets-link.interfaces';
import { QdDataFacetsStatusData } from '../../core/data-facets/status/data-facets-status.interfaces';
import { QdDataFacetsTextConfig } from '../../core/data-facets/text/data-facets-text.interfaces';
import { QdBreakpoint } from '../../core/model/breakpoint.interface';
import { QdTreeSecondaryAction } from './tree-config-actions.interface';
/**
 * @description Configuration Model for QdTree. The generic type defines the tree columns keys.
 */
export interface QdTreeConfig<T extends string> {
    /**
     * @description Defines the columns of the tree.
     */
    columns: QdTreeConfigColumn<T>[];
    /**
     * @description Configures the behavior of the groups in the tree.
     */
    group?: QdTreeGroupConfig;
    /**
     * @description Sets an alternative view if no elements are available in QdTreeData
     */
    emptyStateView?: QdTreeEmptyStateView;
    /**
     * @description Sets the translation keys (plural) for the tree headings and more, as the 'context' for instance.
     *
     * * @example: "i18n.my.tree.<column>".
     *
     * If none exits, the value is rendered without translation.
     */
    i18ns?: string;
    /**
     * @description Turns a specified column into a main column. Main Columns have different presentation properties.
     *
     * * @default: columns[0].column
     */
    mainColumn?: T;
    /**
     * @description Usually the tree fills 100% of the width.
     * This value defines which column fills the space in the tree to its full width.
     * If the value "none" is used, the tree can be less than 100% in width.
     *
     * Find out more in the related type "QdTreeConfig<T>['mainColumn']".
     *
     * * @default: 'main'
     */
    whichColumnFillsWidth?: 'main' | 'last' | 'none';
    /**
     * @description Enables "viewonly" mode for the tree.
     *
     * When set to `true`, the table displays its content as read-only.
     * Combined with `secondaryActions`, this can be used to selectively show or hide secondary actions
     * based on the operation mode (`'view'` or `'edit'`) used in the Quadrel framework.
     *
     * * If `viewonly` is explicitly set, it overrides the global operation mode
     * (which is normally controlled through external events).
     * This gives you full control: for example, setting `viewonly: false` will allow edit actions to be shown,
     * even if the global mode would normally hide them.
     *
     * * @default false
     */
    viewonly?: boolean;
    /**
     * @description Sets a unique identifier for the tree. Used as key to hold in NgRx store.
     *
     * * @default: random RFC 4122 Identifier
     */
    uid?: string;
    /**
     * @description Defines a list of secondary actions that can be executed per Click/Tab of an item in the menu.
     *
     * * @example
     * This is how the two actions "edit" and "delete" are created.
     * ```ts
     * secondaryActions: [
     *    {
     *      type: 'edit',
     *      handler: rowData => doSomethingWith(rowData)
     *    },
     *    {
     *      type: 'delete',
     *      isHidden: true,
     *      handler: rowData => doSomethingWith(rowData)
     *    }
     * ]
     * ```
     */
    secondaryActions?: QdTreeSecondaryAction<T>[];
}
export type QdTreeConfigColumn<T> = QdTreeConfigColumnType & QdTreeConfigColumnBase<T>;
/**
 * @description Base configuration model for the columns.
 */
interface QdTreeConfigColumnBase<T> {
    /**
     * @description Defines the key of the column.
     */
    column: T;
    /**
     * @description Defines the breakpoint at which the column is hidden. Use for mobile devices.
     */
    hiddenAt?: QdBreakpoint;
}
/**
 * @description Defines the column types.
 */
export type QdTreeConfigColumnType = 
/**
 * @description Renders a blank cell.
 */
{
    type: 'blank';
}
/**
 * @description Renders a checkmark icon if the value is true.
 */
 | {
    type: 'boolean';
}
/**
 * @description Renders a number/quantity.
 */
 | {
    type: 'integer';
}
/**
 * @description Renders a progress bar.
 */
 | {
    type: 'progress';
}
/**
 * @description Renders one or multiple links.
 */
 | {
    type: 'link';
    options: QdDataFacetsLinkConfig;
}
/**
 * @description Renders a text.
 */
 | {
    type: 'text';
    options?: QdDataFacetsTextConfig;
}
/**
 * @description Renders a single chip.
 *
 * * Note: The content type "chip" can handle a single chip or an array of chips.
 *   A chip can be a simple string or an object of the form { label: string; level: QdChipColor }.
 */
 | {
    type: 'chip';
    options?: QdDataFacetsChipConfig;
}
/**
 * @description Renders the status with status indicator.
 */
 | {
    type: 'status';
    options?: QdDataFacetsStatusData;
}
/**
 * @description Renders an icon of the QD icon set.
 */
 | {
    type: 'icon';
}
/**
 * @description Renders a date and time either with default format or with the format specified in the provided options.
 *
 * * Note: Like the Angular DatePipe it is based on, the content type "dateTime" can handle multiple input types: string | number | Date
 */
 | {
    type: 'date';
    options?: QdDataFacetsDateConfig;
}
/**
 * @description Configuration options for currency values.
 */
 | {
    type: 'currency';
    options?: QdDataFacetsCurrencyConfig;
}
/**
 * @description Creates a group for the tree
 */
 | {
    type: 'group';
}
/**
 * @description Renders a tree view for the specific row.
 */
 | {
    type: 'tree';
};
/**
 * @description Configures the behavior of the groups in the tree view.
 */
export interface QdTreeGroupConfig {
    /**
     * @description Click/tap to release the groups.
     *
     * * @default: false
     */
    toggle?: boolean;
    /**
     * @description Rows that are grouped together are aggregated.
     *
     * * @default: true
     */
    aggregation?: boolean;
}
/**
 * @description Configuration model for empty state view
 */
export interface QdTreeEmptyStateView {
    /**
     * @description Toggles the empty view off, if set to "true".
     *
     * * @default: false
     */
    disabled?: boolean;
    /**
     * @description Renders an action button.
     *
     * * @default: false
     */
    action?: boolean;
    /**
     * @description Defines a handler that is triggered by a click/tap on the call-to-action button.
     * Will only be triggered if "action" is set to "true
     */
    handler?: () => void;
}
export {};
//# sourceMappingURL=tree-config.interface.d.ts.map