import { jsx as _jsx } from "react/jsx-runtime";
import { cnb } from "cnbuilder";
import { forwardRef } from "react";
import { bem } from "../utils/bem.js";
const styles = bem("rmd-window-splitter");
/**
 * @remarks \@since 6.0.0
 */ export function windowSplitter(options = {}) {
    const { vertical = false, dragging, reversed, disableFixed, className } = options;
    return cnb(styles({
        h: !vertical,
        hr: !vertical && reversed,
        v: vertical,
        vr: vertical && reversed,
        a: disableFixed,
        dragging
    }), className);
}
/**
 * **Server Component**
 * Most likely a client component since it relies on `useWindowSplitter`
 *
 * @see {@link useWindowSplitter} for an example usage
 * @remarks \@since 6.0.0
 */ export const WindowSplitter = /*#__PURE__*/ forwardRef(function WindowSplitter(props, ref) {
    const { role = "separator", className, dragging, reversed, disableFixed = false, ...remaining } = props;
    const vertical = props["aria-orientation"] === "vertical";
    return /*#__PURE__*/ _jsx("button", {
        ...remaining,
        ref: ref,
        type: "button",
        role: role,
        className: windowSplitter({
            className,
            reversed,
            dragging,
            vertical,
            disableFixed
        })
    });
});

//# sourceMappingURL=WindowSplitter.js.map