import React from 'react';
import { Alert, AlertIcon, Flex, AlertTitle, AlertDescription, CloseButton } from '@chakra-ui/react';
import Link from '../link/index.js';

var BareAlert = function (_a) {
    var title = _a.title, description = _a.description, link = _a.link, type = _a.type, icon = _a.icon, onClose = _a.onClose;
    return (React.createElement(Alert, { status: type },
        React.createElement(AlertIcon, null, icon),
        React.createElement(Flex, { direction: "column", w: "100%" },
            title ? React.createElement(AlertTitle, null, title) : null,
            React.createElement(AlertDescription, null, description),
            link ? (React.createElement(Link, { as: link.as === 'link' ? 'a' : link.as, href: link.url, isExternal: link.isExternal, onClick: link.onClick }, link.text)) : null),
        onClose ? (React.createElement(CloseButton, { alignSelf: "flex-start", position: "relative", onClick: onClose })) : null));
};

export { BareAlert as default };
//# sourceMappingURL=Bare.js.map
