'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import './index.scss';
import { Link } from '../Link/index.js';
const baseClass = 'banner';
export const Banner = ({ type = 'default', alignIcon = 'right', children, className, icon, onClick, to })=>{
    const classes = [
        baseClass,
        `${baseClass}--type-${type}`,
        className && className,
        to && `${baseClass}--has-link`,
        (to || onClick) && `${baseClass}--has-action`,
        icon && `${baseClass}--has-icon`,
        icon && `${baseClass}--align-icon-${alignIcon}`
    ].filter(Boolean).join(' ');
    let RenderedType = 'div';
    if (onClick && !to) {
        RenderedType = 'button';
    }
    if (to) {
        RenderedType = Link;
    }
    return /*#__PURE__*/ _jsxDEV(RenderedType, {
        className: classes,
        href: to || null,
        onClick: onClick,
        children: [
            icon && alignIcon === 'left' && /*#__PURE__*/ _jsxDEV(React.Fragment, {
                children: icon
            }, void 0, false, {
                fileName: "src/elements/Banner/index.tsx",
                lineNumber: 62,
                columnNumber: 40
            }, this),
            /*#__PURE__*/ _jsxDEV("span", {
                className: `${baseClass}__content`,
                children: children
            }, void 0, false, {
                fileName: "src/elements/Banner/index.tsx",
                lineNumber: 63,
                columnNumber: 7
            }, this),
            icon && alignIcon === 'right' && /*#__PURE__*/ _jsxDEV(React.Fragment, {
                children: icon
            }, void 0, false, {
                fileName: "src/elements/Banner/index.tsx",
                lineNumber: 64,
                columnNumber: 41
            }, this)
        ]
    }, void 0, true, {
        fileName: "src/elements/Banner/index.tsx",
        lineNumber: 61,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map