import React from 'react';
import { Button } from '../Button/index.js';
const baseClass = 'card';
export const Card = (props)=>{
    const { id, Link, actions, buttonAriaLabel, href, onClick, title, titleAs } = props;
    const classes = [
        baseClass,
        id,
        (onClick || href) && `${baseClass}--has-onclick`
    ].filter(Boolean).join(' ');
    const Tag = titleAs ?? 'div';
    return /*#__PURE__*/ React.createElement("div", {
        className: classes,
        id: id
    }, /*#__PURE__*/ React.createElement(Tag, {
        className: `${baseClass}__title`
    }, title), actions && /*#__PURE__*/ React.createElement("div", {
        className: `${baseClass}__actions`
    }, actions), (onClick || href) && /*#__PURE__*/ React.createElement(Button, {
        Link: Link,
        "aria-label": buttonAriaLabel,
        buttonStyle: "none",
        className: `${baseClass}__click`,
        el: "link",
        onClick: onClick,
        to: href
    }));
};

//# sourceMappingURL=index.js.map