import { ValuesOf } from '@iqser/common-ui/lib/utils';

export interface IBasicHeaderElement {
    readonly img?: string;
    readonly title?: string;
    readonly onClick?: () => void;
}

export interface IHeaderElement {
    readonly type: string;
    readonly element?: string;
    readonly dataElement?: string;
    readonly img?: string;
    readonly title?: string;
    readonly toolGroup?: string;
    readonly render?: () => void;
    readonly onClick?: () => void;
    readonly initialState?: string;
    readonly states?: Record<string, IBasicHeaderElement>;
    readonly mount?: (update: (state: string) => void) => void;
}

export const RotationTypes = {
    LEFT: 270,
    RIGHT: 90,
} as const;

export type RotationType = ValuesOf<typeof RotationTypes>;
