'use client'; import React, { useMemo, useState } from 'react'; import { useRemoveMetricsFromDashboard } from '@/api/buster_rest/dashboards'; import { Button } from '@/components/ui/buttons'; import { Dropdown, type DropdownItems, type DropdownItem } from '@/components/ui/dropdown'; import { DotsVertical, Trash, WandSparkle, ShareRight, PenSparkle, SquareChartPen, Code } from '@/components/ui/icons'; import { cn } from '@/lib/utils'; import { ASSET_ICONS } from '@/components/features/config/assetIcons'; import { assetParamsToRoute } from '@/lib/assets/assetParamsToRoute'; import { useChatLayoutContextSelector } from '@/layouts/ChatLayout'; import { FollowUpWithAssetContent } from '@/components/features/popups/FollowUpWithAsset'; import { useGetMetric } from '@/api/buster_rest/metrics'; import { getShareAssetConfig } from '@/components/features/ShareMenu/helpers'; import { getIsEffectiveOwner } from '@/lib/share'; import { ShareMenuContent } from '@/components/features/ShareMenu/ShareMenuContent'; import { useStartChatFromAsset } from '@/api/buster_rest/chats'; import { useAppLayoutContextSelector } from '@/context/BusterAppLayout'; import { useFavoriteMetricSelectMenu, useVersionHistorySelectMenu } from '@/components/features/metrics/ThreeDotMenu'; export const MetricItemCardThreeDotMenu: React.FC<{ dashboardId: string; metricId: string; }> = ({ dashboardId, metricId }) => { return (