/*
 * Copyright 2017-2025 VMware, Inc. All rights reserved. VMware Confidential
 */
import { QueryServiceType } from "./query";

export interface BaseExtensionNavRegistration {
    /**
     * The router path to navigate to
     */
    path: string;
    /**
     *  The name of the clarity icon to use. If Clarity doesn't support it, it must be added.
     *  See https://vmware.github.io/clarity/documentation/iconography
     */
    icon: string;
}

export interface CodeBasedExtensionNavRegistration extends BaseExtensionNavRegistration {
    /** i18 key for name of extension, to be used as text for links */
    nameCode: string;
    /** i18n key for description of extension, could be used in a tooltip or as additional text  */
    descriptionCode: string;
}

export interface TextBasedExtensionNavRegistration extends BaseExtensionNavRegistration {
    /** text for links */
    nameText: string;
    /** description of extension, could be used in a tooltip or as additional text  */
    descriptionText: string;
}

export type ExtensionNavRegistration = CodeBasedExtensionNavRegistration | TextBasedExtensionNavRegistration;

export interface ExtensionEntityRegistration {
    entity: QueryServiceType;
    nameCode: string;
    descriptionCode: string;
    actionFactory: (entityId: string) => any;
}
