import { Observable } from 'rxjs';
import { CircleButtonType, ITrackable } from '@iqser/common-ui';
import { type File } from '../files';
import { type Dossier } from '../dossiers';

export const ActionTypes = {
    circleBtn: 'circleBtn',
    downloadBtn: 'downloadBtn',
    toggle: 'toggle',
} as const;

export type ActionType = keyof typeof ActionTypes;

export interface Action extends ITrackable {
    readonly id: string;
    action?: (...args: unknown[]) => void;
    tooltip?: string;
    icon?: string;
    show?: boolean;
    ariaExpanded?: Observable<boolean>;
    showDot?: boolean;
    disabled?: boolean;
    buttonType?: CircleButtonType;
    tooltipClass?: string;
    checked?: boolean;
    class?: Record<string, boolean>;
    files?: File[];
    dossier?: Dossier;
    type: ActionType;
    readonly helpModeKey?: string;
}
