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">
                <p></p>
                <Card cardString={currentCard}/>
            </div>
            <div className="deck">
                <p></p>
                <Card cardString={"AA  BB"} handleClick={handleClick} isHidden={true}/>
            </div>
        </div>
    );
}

export default Deck;
