"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateImportReviewUploadStage = generateImportReviewUploadStage;
function generateImportReviewUploadStage() {
    return `
function UploadStage({
  isLoading,
  onUpload,
}: Readonly<{
  isLoading: boolean
  onUpload: (file: File, options: { includeDetailedUnchangedRecords: boolean }) => Promise<void>
}>) {
  const [selectedFile, setSelectedFile] = useState<File | null>(null)
  const [includeDetailedUnchangedRecords, setIncludeDetailedUnchangedRecords] = useState(false)

  return (
    <Card>
      <CardHeader>
        <CardTitle>Upload Excel File</CardTitle>
      </CardHeader>
      <CardContent className="space-y-4">
        <div className="space-y-2">
          <Label htmlFor="import-review-file">Select an .xlsx or .xls file to preview before importing</Label>
          <Input
            id="import-review-file"
            type="file"
            accept=".xlsx,.xls"
            disabled={isLoading}
            onChange={(event) => setSelectedFile(event.target.files?.[0] ?? null)}
          />
          {selectedFile && <p className="text-sm text-muted-foreground">Selected file: {selectedFile.name}</p>}
        </div>

        <div className="flex items-center gap-2">
          <Checkbox
            id="detailed-unchanged"
            checked={includeDetailedUnchangedRecords}
            checkIcon="check"
            onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
              setIncludeDetailedUnchangedRecords(event.target.checked)
            }
          />
          <Label htmlFor="detailed-unchanged">Include detailed unchanged records</Label>
          <TooltipProvider delayDuration={150}>
            <Tooltip>
              <TooltipTrigger asChild>
                <button
                  type="button"
                  aria-label="Info about detailed unchanged records"
                  className="inline-flex h-5 w-5 items-center justify-center rounded-full border text-xs text-muted-foreground"
                >
                  i
                </button>
              </TooltipTrigger>
              <TooltipContent>
                <p>On large datasets, including unchanged row details may take longer.</p>
              </TooltipContent>
            </Tooltip>
          </TooltipProvider>
        </div>

        <div className="flex gap-3">
          <Button
            disabled={isLoading || !selectedFile}
            onClick={() => selectedFile && void onUpload(selectedFile, { includeDetailedUnchangedRecords })}
          >
            {isLoading ? 'Building preview...' : 'Create Preview'}
          </Button>
        </div>
      </CardContent>
    </Card>
  )
}

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