"use client";
import { jsxs, jsx } from 'react/jsx-runtime';
import { ChevronDownIcon } from '../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.1.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js';
import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { forwardRef } from 'react';
import { Flex } from '../flex/flex.js';
import { useSelectContext } from './select-root.js';
import styles from './select.module.css.js';
import { Trigger, Icon } from '../../node_modules/.pnpm/@radix-ui_react-select@2.2.5_@types_react-dom@19.1.7_@types_react@19.1.9__@types_react@19.1.9_irkq3yh3qlkawac7zwq2rwd6bi/node_modules/@radix-ui/react-select/dist/index.js';
import { Root as Slot } from '../../node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.1.9_react@19.1.1/node_modules/@radix-ui/react-slot/dist/index.js';

const trigger = cva(styles.trigger, {
    variants: {
        size: {
            small: styles['trigger-small'],
            medium: styles['trigger-medium']
        },
        variant: {
            outline: styles['trigger-outline'],
            text: styles['trigger-text']
        }
    },
    defaultVariants: {
        size: 'medium',
        variant: 'outline'
    }
});
const SelectTrigger = forwardRef(({ size, variant, className, children, iconProps = {}, asChild, 'aria-label': ariaLabel, ...props }, ref) => {
    const { multiple, autocomplete } = useSelectContext();
    return (jsxs(Trigger, { "data-multiselectable": multiple ? true : undefined, ref: ref, className: trigger({ size, variant, className }), "aria-label": ariaLabel || 'Select option', "aria-haspopup": autocomplete ? 'dialog' : 'listbox', ...props, children: [jsx(Flex, { className: styles.triggerContent, align: 'center', gap: 2, children: asChild ? jsx(Slot, { children: children }) : children }), jsx(Icon, { asChild: true, children: jsx(ChevronDownIcon, { className: styles.triggerIcon, "aria-hidden": 'true', ...iconProps }) })] }));
});
SelectTrigger.displayName = Trigger.displayName;

export { SelectTrigger };
//# sourceMappingURL=select-trigger.js.map
