"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateImportReviewResultStage = generateImportReviewResultStage;
function generateImportReviewResultStage() {
    return `
function ResultStage({ result, onReset }: Readonly<{ result: ImportExecutionSummary; onReset: () => void }>) {
  return (
    <>
      <Card>
        <CardHeader>
          <CardTitle>Import Complete</CardTitle>
        </CardHeader>
        <CardContent className="space-y-4">
          <div className="grid grid-cols-2 gap-3 sm:grid-cols-3">
            <SummaryCard label="Applied" count={result.totalApplied} variant="success" />
            <SummaryCard label="Skipped" count={result.totalSkipped} variant="warning" />
            <SummaryCard label="Total" count={result.totalApplied + result.totalSkipped} variant="neutral" />
          </div>
        </CardContent>
      </Card>

      {Object.keys(result.applied).length > 0 && (
        <Card>
          <CardHeader>
            <CardTitle>Applied Changes</CardTitle>
          </CardHeader>
          <CardContent>
            <div className="space-y-2">
              {Object.entries(result.applied).map(([model, counts]) => (
                <div key={model} className="flex items-center gap-2">
                  <span className="min-w-32 font-medium">{getModelLabel(model)}</span>
                  {counts.created > 0 && (
                    <Badge variant="outline" className={TYPE_BADGE_CLASSES.create}>
                      {counts.created} created
                    </Badge>
                  )}
                  {counts.updated > 0 && (
                    <Badge variant="outline" className={TYPE_BADGE_CLASSES.update}>
                      {counts.updated} updated
                    </Badge>
                  )}
                  {counts.deleted > 0 && (
                    <Badge variant="outline" className={TYPE_BADGE_CLASSES.delete}>
                      {counts.deleted} deleted
                    </Badge>
                  )}
                </div>
              ))}
            </div>
          </CardContent>
        </Card>
      )}

      {Object.keys(result.skipped).length > 0 && (
        <Card>
          <CardHeader>
            <CardTitle>Skipped (Errors)</CardTitle>
          </CardHeader>
          <CardContent>
            <div className="space-y-2">
              {Object.entries(result.skipped).map(([model, counts]) => (
                <div key={model} className="flex items-center gap-2">
                  <span className="min-w-32 font-medium">{getModelLabel(model)}</span>
                  <Badge variant="outline" className={TYPE_BADGE_CLASSES.errors}>
                    {counts.errors} errors
                  </Badge>
                </div>
              ))}
            </div>
          </CardContent>
        </Card>
      )}

      <Button onClick={onReset}>Import Another File</Button>
    </>
  )
}

function SummaryCard({
  label,
  count,
  variant,
}: Readonly<{
  label: string
  count: number
  variant: 'success' | 'warning' | 'neutral'
}>) {
  const colors = {
    success: 'text-green-700 dark:text-green-400',
    warning: 'text-amber-700 dark:text-amber-400',
    neutral: 'text-muted-foreground',
  }

  return (
    <div className="rounded border p-3 text-center">
      <div className={"text-2xl font-bold " + colors[variant]}>{count}</div>
      <div className="text-xs text-muted-foreground">{label}</div>
    </div>
  )
}

`;
}
//# sourceMappingURL=import-review-page-result-stage.generator.js.map