import streamlit.components.v1 as components
import os

frontend_dir = os.path.join(os.path.dirname(__file__), "frontend")
_card_component = components.declare_component(
    "streamlit_cards",
    path=frontend_dir
)


def card(cols, cards, key=None):
    return _card_component(
        card_components={
            "col":cols,
            "cards":cards, },
        key=key
    )