import { IconProps } from "@trackunit/react-components"; import { IconName } from "@trackunit/ui-icons"; import { MouseEvent, ReactNode, RefObject } from "react"; type IconExposedProp = Omit; export type ActionModel = (MethodAction | RouteAction) & CommonAction; export type DropdownModel = MethodAction & CommonAction & { dropdown: ReactNode; }; export type MethodAction = { type: "method"; method: (e: MouseEvent) => void; }; export type RouteAction = { type: "route"; url: string; onClick?: (url: string) => void; }; export interface CommonAction extends IconExposedProp { id: string; label: string; icon?: IconName; ref?: RefObject; style?: Record; loading?: boolean; disabled?: boolean; tip?: string; } export {};