import { AppBar as MuiAppBar, Toolbar, Typography, Button, Box } from '@mui/material';
import { Download, MenuBook } from '@mui/icons-material';

interface AppBarProps {
  onDownload: () => void;
}

const AppBar: React.FC<AppBarProps> = ({ onDownload }) => {
  return (
    <MuiAppBar position="static" elevation={1}>
      <Toolbar>
        <Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
          Proofery - Proof Verification (WIP)
        </Typography>
        <Box sx={{ display: 'flex', gap: 1 }}>
          <Button
            color="inherit"
            startIcon={<MenuBook />}
            href="https://github.com/concept-collection/proofery"
            target="_blank"
            rel="noopener noreferrer"
          >
            Docs
          </Button>
          <Button
            color="inherit"
            startIcon={<Download />}
            onClick={onDownload}
          >
            Download .prf
          </Button>
        </Box>
      </Toolbar>
    </MuiAppBar>
  );
};

export default AppBar;
