import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { block } from "../../../utils/cn.js";
import { StarRating } from "../StarRating/index.js";
import "./RatingBlock.css";
const b = block('rating-block');
/**
 * RatingBlock - Universal rating block with title and star rating
 *
 * Can be used for customer satisfaction surveys (CSAT), product reviews,
 * article/video ratings, teacher evaluations, or any feedback collection.
 *
 * @example
 * ```tsx
 * <RatingBlock
 *   title="Rate the assistant response:"
 *   value={rating}
 *   onChange={setRating}
 *   size="l"
 * />
 * ```
 * @returns {JSX.Element} Rating block component
 */
export function RatingBlock({ title, value, onChange, size = 'l', className, qa }) {
    return (_jsx("div", { className: b(null, className), "data-qa": qa, children: _jsxs("div", { className: b('header'), children: [_jsx("div", { className: b('left'), children: title && _jsx("div", { className: b('title'), children: title }) }), _jsx("div", { className: b('right'), children: _jsx(StarRating, { value: value, onChange: onChange, size: size, qa: qa }) })] }) }));
}
//# sourceMappingURL=RatingBlock.js.map
