import { IconChevronRight, IconMore } from '@douyinfe/semi-icons'; import { Button } from '@douyinfe/semi-ui'; import type { ReactNode } from 'react'; import { useState } from 'react'; import { WorkspaceSideSheet } from '../shared/WorkspaceSideSheet'; export type VehicleAction = { key: string; label: string; icon: ReactNode; to: string; type: 'primary' | 'tertiary'; }; export default function VehicleActions({ actions, mobile, onSelect }: { actions: VehicleAction[]; mobile: boolean; onSelect: (to: string) => void; }) { const [open, setOpen] = useState(false); const primaryActions = actions.filter((action) => action.key === 'switch' || action.key === 'tracks'); const overflowActions = actions.filter((action) => action.key !== 'switch' && action.key !== 'tracks'); const selectAction = (to: string) => { setOpen(false); onSelect(to); }; if (!mobile) return