'use client';
import LinkImport from 'next/link.js';
import * as React from 'react'; // TODO: abstract this out to support all routers
const Link = LinkImport.default || LinkImport;
const baseClass = 'popup-button-list';
export const ButtonGroup = ({ buttonSize = 'default', children, className, textAlign = 'left' })=>{
    const classes = [
        baseClass,
        className,
        `${baseClass}__text-align--${textAlign}`,
        `${baseClass}__button-size--${buttonSize}`
    ].filter(Boolean).join(' ');
    return /*#__PURE__*/ React.createElement("div", {
        className: classes
    }, children);
};
export const Button = ({ id, active, children, className, href, onClick })=>{
    const classes = [
        `${baseClass}__button`,
        active && `${baseClass}__button--selected`,
        className
    ].filter(Boolean).join(' ');
    if (href) {
        return /*#__PURE__*/ React.createElement(Link, {
            className: classes,
            href: href,
            id: id,
            onClick: ()=>{
                if (onClick) {
                    onClick();
                }
            }
        }, children);
    }
    if (onClick) {
        return /*#__PURE__*/ React.createElement("button", {
            className: classes,
            id: id,
            onClick: ()=>{
                if (onClick) {
                    onClick();
                }
            },
            type: "button"
        }, children);
    }
    return /*#__PURE__*/ React.createElement("div", {
        className: classes,
        id: id
    }, children);
};

//# sourceMappingURL=index.js.map