'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var sidePanel_module = require('./side-panel.module.css.cjs');
var flex = require('../flex/flex.cjs');
var text = require('../text/text.cjs');

const sidePanelRoot = index.cva(sidePanel_module.default["side-panel"], {
    variants: {
        side: {
            left: sidePanel_module.default["side-panel-left"],
            right: sidePanel_module.default["side-panel-right"],
        },
    },
    defaultVariants: {
        side: "right",
    },
});
const SidePanelRoot = ({ children, side = "right", className, }) => {
    return (jsxRuntime.jsx("aside", { className: sidePanelRoot({ side, className }), children: children }));
};
const SidePanelHeader = ({ title, icon, actions = [], description, }) => {
    return (jsxRuntime.jsxs("div", { className: sidePanel_module.default["side-panel-header"], children: [jsxRuntime.jsxs(flex.Flex, { gap: 3, justify: "between", align: "center", children: [jsxRuntime.jsxs(flex.Flex, { gap: 3, children: [icon, jsxRuntime.jsx(text.Text, { size: 5, weight: 500, children: title })] }), jsxRuntime.jsx(flex.Flex, { gap: 3, children: actions?.map((action, index) => (jsxRuntime.jsx(React.Fragment, { children: action }, index))) })] }), description ? jsxRuntime.jsx(text.Text, { size: 2, children: description }) : null] }));
};
const SidePanelSection = ({ children }) => {
    return jsxRuntime.jsx("div", { className: sidePanel_module.default["side-panel-section"], children: children });
};
const SidePanel = Object.assign(SidePanelRoot, {
    Header: SidePanelHeader,
    Section: SidePanelSection,
});

exports.SidePanel = SidePanel;
//# sourceMappingURL=side-panel.cjs.map
