import './card-proj-download.css';
import { IProjDownload } from "../../interfaces/card/ICardProj.ts";

export default function CardProjDownload(props: IProjDownload) {
    return (
        // <div className="card-proj-download">
        <div className={props.canBtnClick ? 'card-proj-download' : 'card-proj-nodownload'}>
            <div className="cpDown-title">{props.title}</div>
            <div className='cpDown-bot'>
                <div className="cpDown-desc">{props.desc}</div>
                <div className="cpDown-option">
                    {
                        props.canBtnClick ? (
                            <a href="/#" className="cpDown-edit" onClick={(e) => {
                                e.preventDefault();
                                props.handleDownload();
                            }}>下载</a>
                        ) : (
                            <a href="/#" className="cpDown-noedit" style={{ color: '#c2c2c2' }} onClick={(e) => {
                                e.preventDefault();
                            }}>下载</a>
                        )
                    }

                </div>
            </div>
            <div className='downBoxx'></div>
        </div>
    )
}