import type { ReactNode } from 'react' import { cn } from '@langgenius/dify-ui/cn' import { Drawer, DrawerBackdrop, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, } from '@langgenius/dify-ui/drawer' import { useCallback } from 'react' type FeaturePanelDrawerProps = { className?: string children: ReactNode show: boolean onClose?: () => void inWorkflow?: boolean } export function FeaturePanelDrawer({ className, children, show, onClose, inWorkflow = true, }: FeaturePanelDrawerProps) { const close = useCallback(() => onClose?.(), [onClose]) return ( { if (!open) close() }} > {children} ) }