"use client";
import { jsx } from 'react/jsx-runtime';
import { cx } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { forwardRef } from 'react';
import { Select } from '../select/select.js';
import { useCodeBlockContext } from './code-block-root.js';
import styles from './code-block.module.css.js';

const CodeBlockLanguageSelect = (props) => {
    const { value, setValue } = useCodeBlockContext();
    const handleValueChange = (value) => {
        setValue(value);
    };
    return jsx(Select, { onValueChange: handleValueChange, value: value, ...props });
};
CodeBlockLanguageSelect.displayName = 'CodeBlockLanguageSelect';
const CodeBlockLanguageSelectTrigger = forwardRef(({ className, ...props }, ref) => {
    return (jsx(Select.Trigger, { ref: ref, className: cx(styles.languageSelectTrigger, className), size: 'small', variant: 'text', ...props, children: jsx(Select.Value, {}) }));
});
CodeBlockLanguageSelectTrigger.displayName = 'CodeBlockLanguageSelectTrigger';

export { CodeBlockLanguageSelect, CodeBlockLanguageSelectTrigger };
//# sourceMappingURL=code-block-language-select.js.map
