import { TranslatableString } from '@siemens/element-translate-ng/translate';
import { ModalDependencyInjectionOptions } from '@siemens/element-ng/modal';
import { Observable } from 'rxjs';
import * as i0 from '@angular/core';

/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */

interface Column {
    /**
     * Unique id
     */
    id: string;
    /**
     * Title of the column.
     */
    title: string;
    /**
     * Decides if the column is visible to the user.
     */
    visible: boolean;
    /**
     * If true, the order of the column can be changed by dragging it to another position.
     */
    draggable: boolean;
    /**
     * If true, the column is disabled and cannot be interacted with.
     * This means, the user cannot change any of the column options
     * like the visibility etc.
     */
    disabled: boolean;
    /**
     * If true, the {@link title} can be renamed.
     */
    editable?: boolean;
}
interface SiColumnSelectionDialogConfig {
    heading: TranslatableString;
    bodyTitle: TranslatableString;
    submitBtnName?: TranslatableString;
    cancelBtnName?: TranslatableString;
    restoreToDefaultBtnName?: TranslatableString;
    hiddenText?: TranslatableString;
    visibleText?: TranslatableString;
    columnVisibilityConfigurable?: boolean;
    restoreEnabled?: boolean;
    columns: Column[];
    translationParams?: {
        [key: string]: any;
    };
    listAriaLabel?: TranslatableString;
    renameInputAriaLabel?: TranslatableString;
    a11yItemMovedMessage?: TranslatableString;
    a11yItemNotMovedMessage?: TranslatableString;
}
interface ColumnSelectionDialogResult {
    type: ColumnSelectionDialogResultType;
    columns: Column[];
    /** when `type === 'restoreDefault'`, this function is set and allows to provide the columns */
    updateColumns?: (columns: Column[]) => void;
}
/**
 * Emit type of dialog actions.
 *
 * `ok` : Emitted when user submits.
 * `cancel` : Emitted when user clicks cancel.
 * `instant` : Emitted when visibility or place of a row changes.
 *
 * `instant` type is used to reflect the ui changes real time even before closing the dialog.
 */
type ColumnSelectionDialogResultType = 'ok' | 'cancel' | 'instant' | 'restoreDefault';

declare class SiColumnSelectionDialogService {
    private modalService;
    /**
     * Opens a column selection dialog.
     *
     * Despite other dialogs,
     * this dialog informs the consumer not ONLY with clicking `submit` or `cancel`,
     * but also with changing the place or visibility of a dialog row
     * thanks to the `instant` type of emitted event.
     *
     * {@label WITH_OBJECT}
     */
    showColumnSelectionDialog(dialogConfig: SiColumnSelectionDialogConfig, diOptions?: ModalDependencyInjectionOptions): Observable<ColumnSelectionDialogResult>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiColumnSelectionDialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SiColumnSelectionDialogService>;
}

export { SiColumnSelectionDialogService };
export type { Column, ColumnSelectionDialogResult, ColumnSelectionDialogResultType, SiColumnSelectionDialogConfig };
