import type { UmbAction } from '../../core/action/index.js'; import type { UmbControllerHostElement } from '../../../libs/controller-api/index.js'; import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '../../../libs/extension-api/index.js'; export interface UmbCurrentUserActionArgs { meta: MetaArgsType; } export interface UmbCurrentUserAction extends UmbAction> { /** * The href location, the action will act as a link. * @returns {Promise} */ getHref(): Promise; /** * The `execute` method, the action will act as a button. * @returns {Promise} */ execute(): Promise; } export interface ManifestCurrentUserAction extends ManifestElementAndApi>, ManifestWithDynamicConditions { type: 'currentUserAction'; meta: MetaType; } export interface MetaCurrentUserAction { } export interface ManifestCurrentUserActionDefaultKind extends ManifestCurrentUserAction { type: 'currentUserAction'; kind: 'default'; } export interface MetaCurrentUserActionDefaultKind extends MetaCurrentUserAction { /** * An icon to represent the action to be performed * @examples [ * "icon-box", * "icon-grid" * ] */ icon?: string; /** * The friendly name of the action to perform * @examples [ * "Create", * "Create Content Template" * ] */ label: string; } declare global { interface UmbExtensionManifestMap { umbCurrentUserAction: ManifestCurrentUserAction; } }