import React from 'react'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, } from './dialog'; import { Input } from './input'; import { Button } from './button'; type PasswordDialogProps = { open: boolean; onOpenChange: (_open: boolean) => void; setPassword: (_password: string) => void; handleSubmit: () => void; isError?: boolean; } export const PasswordDialog = ({ open, onOpenChange, handleSubmit, isError, setPassword }: PasswordDialogProps) => { return ( Password Required {isError ? ( Incorrect password. Please try again. ) : ( This document is password protected. Please enter the password to view the document. )} setPassword(e.target.value)} /> ); };