"use client"; import { SourceSetupPanel } from "~/components/custom-widgets/integration-source-select"; import type { ModalProps } from "@mantine/core"; import type { HomarrCustomWidgetV2 } from "@homarr/custom-widgets/core"; import { ImportReviewDialog } from "@homarr/custom-widgets/workbench"; import { useI18n } from "@homarr/translation/client"; import { useCustomWidgetImport } from "./use-custom-widget-import"; interface CustomWidgetImportDialogProps { opened: boolean; widget: HomarrCustomWidgetV2 | null; legacyId?: string; stackId?: string; zIndex?: number; modalProps?: Pick; labels?: { title?: string; description?: string; cancel?: string; confirm?: string; }; onClose(): void; onImported?(result: { id: string }): void; } export function CustomWidgetImportDialog({ opened, widget, legacyId, stackId, zIndex, modalProps, labels, onClose, onImported, }: CustomWidgetImportDialogProps) { const t = useI18n("customWidget"); const importer = useCustomWidgetImport({ widget, legacyId, onImported: (result) => { onImported?.(result); onClose(); }, }); return ( ); }