import {Box, CardActions, IconButton} from "@mui/material";
import {Edit as EditIcon} from "@mui/icons-material";
import React from "react";
import {Link} from "react-router-dom";
import Button from "@mui/material/Button";

const ChampionshipCardAction = ({champId}) => {
    return (
        <CardActions sx={{justifyContent: 'flex-start', p: 2}}>
            {/* Действия */}
            <Box sx={{display: 'flex', gap: 1}}>
                <Button
                    component={Link}
                    to={`/championships/${champId}`}
                    size="small"
                    color="primary"
                    variant="contained"
                >
                    Подробнее
                </Button>
                <IconButton
                    component={Link}
                    to={`/championships/${champId}/edit`}
                    size="small"
                    color="secondary"
                    title="Редактировать"
                >
                    <EditIcon fontSize="small"/>
                </IconButton>
            </Box>
        </CardActions>
    )
}

export default ChampionshipCardAction;