import React, {FunctionComponent} from "react";
import Card from "./Card";

interface Props {
    currentCard: string;
    actionOnClick: () => void;
}

const Deck: FunctionComponent<Props> = ({currentCard, actionOnClick}) => {

    const handleClick = (card: string) => {
        actionOnClick();
    }

    return (
        <div className="deck-container">
            <div className="used-cards">
                <Card cardString={currentCard}/>
            </div>
            <div className="deck">
                <Card cardString={"AA  BB"} handleClick={handleClick} isHidden/>
            </div>
        </div>
    );
}

export default Deck;
